





"""simple docstring"""


from __future__ import annotations




def 					lowercase__    (					lowercase_ = 4			)					->		list[list[int]]:




      """simple docstring"""

      _UpperCamelCase      :	Any						=       abs(lowercase_			) or 4
      return [[1 + x + y * row_size for x in range(lowercase_			)] for y in range(lowercase_			)]




def 					lowercase__    (					lowercase_			)					->		list[list[int]]:




      """simple docstring"""

      return reverse_row(transpose(lowercase_			)			)
      # OR.. transpose(reverse_column(matrix))




def 					lowercase__    (					lowercase_			)					->		list[list[int]]:




      """simple docstring"""

      return reverse_row(reverse_column(lowercase_			)			)
      # OR.. reverse_column(reverse_row(matrix))




def 					lowercase__    (					lowercase_			)					->		list[list[int]]:




      """simple docstring"""

      return reverse_column(transpose(lowercase_			)			)
      # OR.. transpose(reverse_row(matrix))




def 					lowercase__    (					lowercase_			)					->		list[list[int]]:




      """simple docstring"""

      _UpperCamelCase      :	List[Any]						=       [list(lowercase_			) for x in zip(*lowercase_			)]
      return matrix




def 					lowercase__    (					lowercase_			)					->		list[list[int]]:




      """simple docstring"""

      _UpperCamelCase      :	Tuple						=       matrix[::-1]
      return matrix




def 					lowercase__    (					lowercase_			)					->		list[list[int]]:




      """simple docstring"""

      _UpperCamelCase      :	List[str]						=       [x[::-1] for x in matrix]
      return matrix




def 					lowercase__    (					lowercase_			)					->		None:




      """simple docstring"""

      for i in matrix:
            print(*lowercase_			)


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

  lowerCamelCase__				  =   make_matrix()
  print("\norigin:\n")
  print_matrix(matrix)
  print("\nrotate 180:\n")
  print_matrix(rotate_aaa(matrix))

  lowerCamelCase__				  =   make_matrix()
  print("\norigin:\n")
  print_matrix(matrix)
  print("\nrotate 270 counterclockwise:\n")
  print_matrix(rotate_aaa(matrix))







"""simple docstring"""


class      __SCREAMING_SNAKE_CASE    :







  '''simple docstring'''


  def __init__(		self   :       Optional[Any]					,   __a   :       list[int]	)		->				None:
        _UpperCamelCase      :	Tuple						=       len(__a	)
        _UpperCamelCase      :	Dict						=       [0] * len_array

        if len_array > 0:
              _UpperCamelCase      :	Optional[Any]						=       array[0]

        for i in range(1					,   __a	):
              _UpperCamelCase      :	Tuple						=       self.prefix_sum[i - 1] + array[i]

  def    __SCREAMING_SNAKE_CASE				(		self   :       Dict					,   __a   :       int					,   __a   :       int	)		->				int:
        if start == 0:
              return self.prefix_sum[end]

        return self.prefix_sum[end] - self.prefix_sum[start - 1]


  def    __SCREAMING_SNAKE_CASE				(		self   :       Optional[Any]					,   __a   :       int	)		->				bool:
        _UpperCamelCase      :	int						=       {0}
        for sum_item in self.prefix_sum:
              if sum_item - target_sum in sums:
                    return True

              sums.add(__a	)

        return False


if __name__ == "__main__":
  import doctest

  doctest.testmod()
