


'''simple docstring'''





import os






def 						UpperCAmelCase__(				):






			"""simple docstring"""




			with open(os.path.dirname(_SCREAMING_SNAKE_CASE ) + '/grid.txt' ) as f:
						__A=	[]  # noqa: E741
						for _ in range(20 ):
									l.append([int(_SCREAMING_SNAKE_CASE ) for x in f.readline().split()] )

						__A=	0

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

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

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

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


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







'''simple docstring'''





from __future__ import annotations

import csv

import requests
from bsa import BeautifulSoup






def 						UpperCAmelCase__(				_SCREAMING_SNAKE_CASE					: str = "" ):






			"""simple docstring"""




			__A=	url or 'https://www.imdb.com/chart/top/?ref_=nv_mv_250'
			__A=	BeautifulSoup(requests.get(_SCREAMING_SNAKE_CASE ).text,'html.parser' )
			__A=	soup.find_all('td',attrs='titleColumn' )
			__A=	soup.find_all('td',class_='ratingColumn imdbRating' )
			return {
			    title.a.text: float(rating.strong.text )
			    for title, rating in zip(_SCREAMING_SNAKE_CASE,_SCREAMING_SNAKE_CASE )
			}






def 						UpperCAmelCase__(				_SCREAMING_SNAKE_CASE					: str = "IMDb_Top_250_Movies.csv" ):






			"""simple docstring"""




			__A=	get_imdb_top_aaa_movies()
			with open(_SCREAMING_SNAKE_CASE,'w',newline='' ) as out_file:
						__A=	csv.writer(_SCREAMING_SNAKE_CASE )
						writer.writerow(['Movie title', 'IMDb rating'] )
						for title, rating in movies.items():
									writer.writerow([title, rating] )


if __name__ == "__main__":
					write_movies()



