






def __A    (      __lowerCAmelCase	)->  int:





						"""simple docstring"""



						if not grid or not grid[0]:
												raise TypeError('The grid does not contain the appropriate information'	)

						for cell_n in range(1 ,		len(grid[0]	)	):
												grid[0][cell_n] += grid[0][cell_n - 1]
						_UpperCAmelCase									=			grid[0]

						for row_n in range(1 ,		len(__lowerCAmelCase	)	):
												_UpperCAmelCase									=			grid[row_n]
												_UpperCAmelCase									=			fill_row(__lowerCAmelCase ,		__lowerCAmelCase	)
												_UpperCAmelCase									=			grid[row_n]

						return grid[-1][-1]


def __A    (      __lowerCAmelCase ,		__lowerCAmelCase	)->  list:





						"""simple docstring"""



						current_row[0] += row_above[0]
						for cell_n in range(1 ,		len(__lowerCAmelCase	)	):
												current_row[cell_n] += min(current_row[cell_n - 1] ,		row_above[cell_n]	)

						return current_row


if __name__ == "__main__":
		import doctest

		doctest.testmod()


_lowerCamelCase       :				int       =			[4, 1, 7, 4, 2, 6, 4, 1, 5, 3, 7, 5]
_lowerCamelCase       :				str       =			[3, 7, 7, 4, 2, 6, 4, 1, 5, 3, 7, 5]
_lowerCamelCase       :				List[str]       =			{
    0: '''Sunday''',
    1: '''Monday''',
    2: '''Tuesday''',
    3: '''Wednesday''',
    4: '''Thursday''',
    5: '''Friday''',
    6: '''Saturday''',
}






def        a_		(       __lowercase   :	int       ,					__lowercase   :	int       ,					__lowercase   :	int ) ->  str:
			assert len(str(__lowercase ) ) > 2, "year should be in YYYY format"
			assert 1 <= month <= 12, "month should be between 1 to 12"
			assert 1 <= day <= 31, "day should be between 1 to 31"

			# Doomsday algorithm:
			_snake_case		=			year // 100
			_snake_case		=			(5 * (century % 4) + 2) % 7
			_snake_case		=			year % 100
			_snake_case		=			centurian % 12
			_snake_case		=			(
			    (centurian // 12) + centurian_m + (centurian_m // 4) + century_anchor
			) % 7
			_snake_case		=			(
			    DOOMSDAY_NOT_LEAP[month - 1]
			    if (year % 4 != 0) or (centurian == 0 and (year % 400) == 0)
			    else DOOMSDAY_LEAP[month - 1]
			)
			_snake_case		=			(dooms_day + day - day_anchor) % 7
			return WEEK_DAY_NAMES[week_day]


if __name__ == "__main__":
			import doctest

			doctest.testmod()