



'''simple docstring'''

def 						_snake_case						(   _SCREAMING_SNAKE_CASE	:		Union[str, Any]				)     ->		bool:







	"""simple docstring"""
	return str(_lowerCAmelCase				) == str(_lowerCAmelCase				)[::-1]






def 						_snake_case						(   _SCREAMING_SNAKE_CASE	:		List[Any]				)     ->		int:







	"""simple docstring"""
	return int(_lowerCAmelCase				) + int(str(_lowerCAmelCase				)[::-1]				)






def 						_snake_case						(   _SCREAMING_SNAKE_CASE	:		List[str] = 10_000				)     ->		int:







	"""simple docstring"""
	lowerCAmelCase       =      []
	for num in range(1				,						_lowerCAmelCase				):
		lowerCAmelCase       =      0
		lowerCAmelCase       =      num
		while iterations < 50:
			lowerCAmelCase       =      sum_reverse(_lowerCAmelCase				)
			iterations += 1
			if is_palindrome(_lowerCAmelCase				):
				break
		else:
			lychrel_nums.append(_lowerCAmelCase				)
	return len(_lowerCAmelCase				)


if __name__ == "__main__":
				print(F'''{solution() = }''')






import os



def 						A_							(	)		->					Union[str, Any]:
 with open(os.path.dirname(_lowerCAmelCase	) + "/grid.txt"	) as f:
  UpperCamelCase      :   Optional[Any]			      =  []  # noqa: E741
  for _ in range(20	):
   l.append([int(_lowerCAmelCase	) for x in f.readline().split()]	)

  UpperCamelCase      :   str			      =  0

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

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

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

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


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