






def __UpperCAmelCase (			A			:	int = 2_0						)  -> int:

			try:
						UpperCAmelCase_     :   List[str]       =   int(A						)
			except (TypeError, ValueError):
						raise TypeError('''Parameter n must be int or castable to int.'''						)
			if n <= 0:
						raise ValueError('''Parameter n must be greater than or equal to one.'''						)
			UpperCAmelCase_     :   Optional[Any]       =   0
			while 1:
						i += n * (n - 1)
						UpperCAmelCase_     :   Tuple       =   0
						for j in range(2	,   A						):
									if i % j != 0:
												UpperCAmelCase_     :   Tuple       =   1
												break
						if nfound == 0:
									if i == 0:
												UpperCAmelCase_     :   Union[str, Any]       =   1
									return i
			return None


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










'''simple docstring'''





def __UpperCAmelCase (			A			:	list[list[int]]						)  -> bool:
			# must be
			UpperCAmelCase_     :   int       =   [list(A						) for row in matrix]
			if matrix and isinstance(A	,   A						):
						if isinstance(matrix[0]	,   A						):
									UpperCAmelCase_     :   Optional[Any]       =   0
									for row in matrix:
												if prev_len == 0:
															UpperCAmelCase_     :   List[str]       =   len(A						)
															UpperCAmelCase_     :   Any       =   True
												else:
															UpperCAmelCase_     :   Tuple       =   prev_len == len(A						)
						else:
									UpperCAmelCase_     :   Any       =   True
			else:
						UpperCAmelCase_     :   Dict       =   False

			return result
def __UpperCAmelCase (			A			:	list[list[int]]						)  -> None:
			if check_matrix(A						) and len(A						) > 0:
						UpperCAmelCase_     :   Dict       =   [list(A						) for row in a]
						UpperCAmelCase_     :   List[Any]       =   len(A						)
						if isinstance(a[0]	,   A						):
									UpperCAmelCase_     :   Any       =   len(a[0]						)
						else:
									for dat in a:
												print(A						)
									return

						# horizotal printing increasing
						for i in range(0	,   A						):
									print(a[0][i]						)
						# vertical printing down
						for i in range(1	,   A						):
									print(a[i][mat_col - 1]						)
						# horizotal printing decreasing
						if mat_row > 1:
									for i in range(mat_col - 2	,   -1	,   -1						):
												print(a[mat_row - 1][i]						)
        # vertical printing up
						for i in range(mat_row - 2	,   0	,   -1						):
									print(a[i][0]						)
						UpperCAmelCase_     :   Union[str, Any]       =   [row[1 : mat_col - 1] for row in a[1 : mat_row - 1]]
						if len(A						) > 0:
									spiral_print_clockwise(A						)
						else:
									return
			else:
						print('''Not a valid matrix'''						)
						return
def __UpperCAmelCase (			A			:	list[list]						)  -> list[int]:
			if matrix:
						return list(matrix.pop(0						)						) + spiral_traversal(list(zip(*A						)						)[::-1]						)
			else:
						return []


# driver code
if __name__ == "__main__":
						import doctest

						doctest.testmod()

						_UpperCamelCase		:		List[Any]								=			[[1, 2, 3, 4], [5, 6, 7, 8], [9, 10, 11, 12]]
						spiral_print_clockwise(a)


