
"""simple docstring"""

from __future__ import annotations
def 		UpperCAmelCase (		a_ = 4      ):





		'''simple docstring'''


		lowerCamelCase					:      Dict          =   abs(_lowerCAmelCase      ) or 4
		return [[1 + x + y * row_size for x in range(_lowerCAmelCase      )] for y in range(_lowerCAmelCase      )]
def 		UpperCAmelCase (		a_      ):





		'''simple docstring'''


		return reverse_row(transpose(_lowerCAmelCase      )      )
		# OR.. transpose(reverse_column(matrix))
def 		UpperCAmelCase (		a_      ):





		'''simple docstring'''


		return reverse_row(reverse_column(_lowerCAmelCase      )      )
		# OR.. reverse_column(reverse_row(matrix))
def 		UpperCAmelCase (		a_      ):





		'''simple docstring'''


		return reverse_column(transpose(_lowerCAmelCase      )      )
		# OR.. transpose(reverse_row(matrix))
def 		UpperCAmelCase (		a_      ):





		'''simple docstring'''


		lowerCamelCase					:      List[Any]          =   [list(_lowerCAmelCase      ) for x in zip(*_lowerCAmelCase      )]
		return matrix
def 		UpperCAmelCase (		a_      ):





		'''simple docstring'''


		lowerCamelCase					:      Optional[Any]          =   matrix[::-1]
		return matrix
def 		UpperCAmelCase (		a_      ):





		'''simple docstring'''


		lowerCamelCase					:      Dict          =   [x[::-1] for x in matrix]
		return matrix
def 		UpperCAmelCase (		a_      ):





		'''simple docstring'''


		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))








"""simple docstring"""

# Lint as: python3
import dataclasses
import re
from dataclasses import dataclass
from functools import total_ordering
from typing import Optional, Union


_A						=			re.compile(r'^(?P<major>\d+)' r'\.(?P<minor>\d+)' r'\.(?P<patch>\d+)$')






@total_ordering
@dataclass
class 	_lowercase       :
	lowercase_				=     42
	lowercase_				=     None
	lowercase_				=     None
	lowercase_				=     None
	lowercase_				=     None




	def       _UpperCamelCase   (			self )		->							List[str]:
			lowerCamelCase     ,   lowerCamelCase     ,   lowerCamelCase					:      List[str]          =   _str_to_version_tuple(self.version_str )




	def __repr__(			self )		->							int:
			return F"""{self.tuple[0]}.{self.tuple[1]}.{self.tuple[2]}"""




	@property
	def       _UpperCamelCase   (			self )		->							Dict:
			return self.major, self.minor, self.patch




	def       _UpperCamelCase   (			self		,			UpperCAmelCase_ )		->							Optional[int]:
			if isinstance(UpperCAmelCase_		,			UpperCAmelCase_ ):
					return Version(UpperCAmelCase_ )
			elif isinstance(UpperCAmelCase_		,			UpperCAmelCase_ ):
					return other
			raise TypeError(F"""{other} (type {type(UpperCAmelCase_ )}) cannot be compared to version.""" )




	def __eq__(			self		,			UpperCAmelCase_ )		->							Optional[Any]:
			try:
					lowerCamelCase					:      List[str]          =   self._validate_operand(UpperCAmelCase_ )
			except (TypeError, ValueError):
					return False
			else:
					return self.tuple == other.tuple




	def __lt__(			self		,			UpperCAmelCase_ )		->							Optional[int]:
			lowerCamelCase					:      Optional[int]          =   self._validate_operand(UpperCAmelCase_ )
			return self.tuple < other.tuple




	def __hash__(			self )		->							Optional[Any]:
			return hash(_version_tuple_to_str(self.tuple ) )




	@classmethod
	def       _UpperCamelCase   (			cls		,			UpperCAmelCase_ )		->							Union[str, Any]:
			lowerCamelCase					:      str          =   {f.name for f in dataclasses.fields(cls )}
			return cls(**{k: v for k, v in dic.items() if k in field_names} )




	def       _UpperCamelCase   (			self )		->							str:
			return self.version_str


def 		UpperCAmelCase (		a_      ):





		'''simple docstring'''


		lowerCamelCase					:      Tuple          =   _VERSION_REG.match(a_      )
		if not res:
				raise ValueError(F"""Invalid version '{version_str}'. Format should be x.y.z with {{x,y,z}} being digits."""      )
		return tuple(int(a_      ) for v in [res.group('major'      ), res.group('minor'      ), res.group('patch'      )]      )





def 		UpperCAmelCase (		a_      ):





		'''simple docstring'''


		return ".".join(str(a_      ) for v in version_tuple      )






