


'''simple docstring'''

from ...processing_utils import ProcessorMixin


class 					a__ (       __A					):







				"""simple docstring"""



				__UpperCamelCase			:						List[str]		=		'SpeechT5FeatureExtractor'
				__UpperCamelCase			:						Tuple		=		'SpeechT5Tokenizer'




				def __init__(self				,	__lowercase				,	__lowercase						):
										super().__init__(lowerCAmelCase_				,	lowerCAmelCase_						)




				def __call__(self				,	*__lowercase				,	**__lowercase						):
										__lowerCAmelCase											= kwargs.pop('''audio'''				,	lowerCAmelCase_						)
										__lowerCAmelCase											= kwargs.pop('''text'''				,	lowerCAmelCase_						)
										__lowerCAmelCase											= kwargs.pop('''text_target'''				,	lowerCAmelCase_						)
										__lowerCAmelCase											= kwargs.pop('''audio_target'''				,	lowerCAmelCase_						)
										__lowerCAmelCase											= kwargs.pop('''sampling_rate'''				,	lowerCAmelCase_						)

										if audio is not None and text is not None:
																raise ValueError(
																    '''Cannot process both `audio` and `text` inputs. Did you mean `audio_target` or `text_target`?'''						)
										if audio_target is not None and text_target is not None:
																raise ValueError(
																    '''Cannot process both `audio_target` and `text_target` inputs. Did you mean `audio` or `text`?'''						)
										if audio is None and audio_target is None and text is None and text_target is None:
																raise ValueError(
																    '''You need to specify either an `audio`, `audio_target`, `text`, or `text_target` input to process.'''						)

										if audio is not None:
																__lowerCAmelCase											= self.feature_extractor(lowerCAmelCase_				,	*lowerCAmelCase_				,	sampling_rate=lowerCAmelCase_				,	**lowerCAmelCase_						)
										elif text is not None:
																__lowerCAmelCase											= self.tokenizer(lowerCAmelCase_				,	**lowerCAmelCase_						)
										else:
																__lowerCAmelCase											= None

										if audio_target is not None:
																__lowerCAmelCase											= self.feature_extractor(audio_target=lowerCAmelCase_				,	*lowerCAmelCase_				,	sampling_rate=lowerCAmelCase_				,	**lowerCAmelCase_						)
																__lowerCAmelCase											= targets["input_values"]
										elif text_target is not None:
																__lowerCAmelCase											= self.tokenizer(lowerCAmelCase_				,	**lowerCAmelCase_						)
																__lowerCAmelCase											= targets["input_ids"]
										else:
																__lowerCAmelCase											= None

										if inputs is None:
																return targets

										if targets is not None:
																__lowerCAmelCase											= labels

																__lowerCAmelCase											= targets.get('''attention_mask'''						)
																if decoder_attention_mask is not None:
																						__lowerCAmelCase											= decoder_attention_mask

										return inputs




				def     _snake_case     (self				,	*__lowercase				,	**__lowercase						):
										__lowerCAmelCase											= kwargs.pop('''input_values'''				,	lowerCAmelCase_						)
										__lowerCAmelCase											= kwargs.pop('''input_ids'''				,	lowerCAmelCase_						)
										__lowerCAmelCase											= kwargs.pop('''labels'''				,	lowerCAmelCase_						)

										if input_values is not None and input_ids is not None:
																raise ValueError('''Cannot process both `input_values` and `input_ids` inputs.'''						)
										if input_values is None and input_ids is None and labels is None:
																raise ValueError(
																    '''You need to specify either an `input_values`, `input_ids`, or `labels` input to be padded.'''						)

										if input_values is not None:
																__lowerCAmelCase											= self.feature_extractor.pad(lowerCAmelCase_				,	*lowerCAmelCase_				,	**lowerCAmelCase_						)
										elif input_ids is not None:
																__lowerCAmelCase											= self.tokenizer.pad(lowerCAmelCase_				,	**lowerCAmelCase_						)
										else:
																__lowerCAmelCase											= None

										if labels is not None:
																if "input_ids" in labels or (isinstance(lowerCAmelCase_				,	lowerCAmelCase_						) and "input_ids" in labels[0]):
																						__lowerCAmelCase											= self.tokenizer.pad(lowerCAmelCase_				,	**lowerCAmelCase_						)
																						__lowerCAmelCase											= targets["input_ids"]
																else:
																						__lowerCAmelCase											= self.feature_extractor.feature_size
																						__lowerCAmelCase											= self.feature_extractor.num_mel_bins
																						__lowerCAmelCase											= self.feature_extractor.pad(lowerCAmelCase_				,	*lowerCAmelCase_				,	**lowerCAmelCase_						)
																						__lowerCAmelCase											= feature_size_hack
																						__lowerCAmelCase											= targets["input_values"]
										else:
																__lowerCAmelCase											= None

										if inputs is None:
																return targets

										if targets is not None:
																__lowerCAmelCase											= labels

																__lowerCAmelCase											= targets.get('''attention_mask'''						)
																if decoder_attention_mask is not None:
																						__lowerCAmelCase											= decoder_attention_mask

										return inputs




				def     _snake_case     (self				,	*__lowercase				,	**__lowercase						):
										return self.tokenizer.batch_decode(*lowerCAmelCase_				,	**lowerCAmelCase_						)




				def     _snake_case     (self				,	*__lowercase				,	**__lowercase						):
										return self.tokenizer.decode(*lowerCAmelCase_				,	**lowerCAmelCase_						)









"""simple docstring"""
import os

def 				snake_case      (   ):
			with open(os.path.dirname(A__						) + "/grid.txt"						) as f:
						UpperCAmelCase_     : Any			     =					[]  # noqa: E741
						for _ in range(20						):
									l.append([int(A__						) for x in f.readline().split()]						)

						UpperCAmelCase_     : Any			     =					0

						# right
						for i in range(20						):
									for j in range(17						):
												UpperCAmelCase_     : Union[str, Any]			     =					l[i][j] * l[i][j + 1] * l[i][j + 2] * l[i][j + 3]
												if temp > maximum:
															UpperCAmelCase_     : Any			     =					temp

        # down
						for i in range(17						):
									for j in range(20						):
												UpperCAmelCase_     : List[Any]			     =					l[i][j] * l[i + 1][j] * l[i + 2][j] * l[i + 3][j]
												if temp > maximum:
															UpperCAmelCase_     : Tuple			     =					temp

        # diagonal 1
						for i in range(17						):
									for j in range(17						):
												UpperCAmelCase_     : str			     =					l[i][j] * l[i + 1][j + 1] * l[i + 2][j + 2] * l[i + 3][j + 3]
												if temp > maximum:
															UpperCAmelCase_     : List[str]			     =					temp

        # diagonal 2
						for i in range(17						):
									for j in range(3	,20						):
												UpperCAmelCase_     : List[Any]			     =					l[i][j] * l[i + 1][j - 1] * l[i + 2][j - 2] * l[i + 3][j - 3]
												if temp > maximum:
															UpperCAmelCase_     : List[str]			     =					temp
						return maximum


if __name__ == "__main__":
			print(solution())



