

from __future__ import annotations

def  lowerCamelCase__ (					_a = 4):
	SCREAMING_SNAKE_CASE   :      Tuple				     =       abs(lowerCAmelCase_) or 4
	return [[1 + x + y * row_size for x in range(lowerCAmelCase_)] for y in range(lowerCAmelCase_)]

def  lowerCamelCase__ (					_a):
	return reverse_row(transpose(lowerCAmelCase_))
	# OR.. transpose(reverse_column(matrix))

def  lowerCamelCase__ (					_a):
	return reverse_row(reverse_column(lowerCAmelCase_))
	# OR.. reverse_column(reverse_row(matrix))

def  lowerCamelCase__ (					_a):
	return reverse_column(transpose(lowerCAmelCase_))
	# OR.. transpose(reverse_row(matrix))

def  lowerCamelCase__ (					_a):
	SCREAMING_SNAKE_CASE   :      Optional[int]				     =       [list(lowerCAmelCase_) for x in zip(*lowerCAmelCase_)]
	return matrix

def  lowerCamelCase__ (					_a):
	SCREAMING_SNAKE_CASE   :      Optional[Any]				     =       matrix[::-1]
	return matrix

def  lowerCamelCase__ (					_a):
	SCREAMING_SNAKE_CASE   :      Optional[int]				     =       [x[::-1] for x in matrix]
	return matrix

def  lowerCamelCase__ (					_a):


	for i in matrix:
		print(*lowerCAmelCase_)


if __name__ == "__main__":
			a_						     =    make_matrix()
			print('\norigin:\n')
			print_matrix(matrix)
			print('\nrotate 90 counterclockwise:\n')
			print_matrix(rotate_aa(matrix))

			a_						     =    make_matrix()
			print('\norigin:\n')
			print_matrix(matrix)
			print('\nrotate 180:\n')
			print_matrix(rotate_aaa(matrix))

			a_						     =    make_matrix()
			print('\norigin:\n')
			print_matrix(matrix)
			print('\nrotate 270 counterclockwise:\n')
			print_matrix(rotate_aaa(matrix))


class _UpperCamelCase							:
			'''simple docstring'''







			def __init__(			self							: Optional[Any]      ,      a							: int	)							->       None:

				"""simple docstring"""

				SCREAMING_SNAKE_CASE   :      Tuple				     =       size
				SCREAMING_SNAKE_CASE   :      Union[str, Any]				     =       [0] * size
				SCREAMING_SNAKE_CASE   :      Union[str, Any]				     =       [0] * size
			@staticmethod
			def 							__UpperCamelCase (			a							: int	)							->       int:

				"""simple docstring"""

				return index | (index + 1)
			@staticmethod
			def 							__UpperCamelCase (			a							: int	)							->       int:

				"""simple docstring"""

				return (index & (index + 1)) - 1
			def 							__UpperCamelCase (			self							: Any      ,      a							: int      ,      a							: int	)							->       None:

				"""simple docstring"""

				SCREAMING_SNAKE_CASE   :      Union[str, Any]				     =       value
				while index < self.size:
					SCREAMING_SNAKE_CASE   :      Dict				     =       self.get_prev(a	) + 1
					if current_left_border == index:
						SCREAMING_SNAKE_CASE   :      Optional[int]				     =       value
					else:
						SCREAMING_SNAKE_CASE   :      Tuple				     =       max(a      ,      a      ,      a	)
					SCREAMING_SNAKE_CASE   :      Optional[Any]				     =       self.get_next(a	)






			def 							__UpperCamelCase (			self							: Optional[int]      ,      a							: int      ,      a							: int	)							->       int:

				"""simple docstring"""

				right -= 1  # Because of right is exclusive
				SCREAMING_SNAKE_CASE   :      Optional[int]				     =       0
				while left <= right:
					SCREAMING_SNAKE_CASE   :      List[Any]				     =       self.get_prev(a	)
					if left <= current_left:
						SCREAMING_SNAKE_CASE   :      List[Any]				     =       max(a      ,      self.tree[right]	)
						SCREAMING_SNAKE_CASE   :      str				     =       current_left
					else:
						SCREAMING_SNAKE_CASE   :      List[str]				     =       max(a      ,      self.arr[right]	)
						right -= 1
				return result


if __name__ == "__main__":
			import doctest

			doctest.testmod()