





import os
import sys
from contextlib import contextmanager


# Windows only
if os.name == "nt":
    import ctypes
    import msvcrt  # noqa

    class     snake_case_		(   ctypes.Structure							):






     '''simple docstring'''





     __UpperCamelCase       =      [('''size''', ctypes.c_int), ('''visible''', ctypes.c_byte)]






def 				_UpperCAmelCase			(    ):




   '''simple docstring'''

   if os.name == "nt":
      UpperCAmelCase__						=CursorInfo()
      UpperCAmelCase__						=ctypes.windll.kernelaa.GetStdHandle(-11     )
      ctypes.windll.kernelaa.GetConsoleCursorInfo(_SCREAMING_SNAKE_CASE				,							ctypes.byref(_SCREAMING_SNAKE_CASE     )     )
      UpperCAmelCase__						=False
      ctypes.windll.kernelaa.SetConsoleCursorInfo(_SCREAMING_SNAKE_CASE				,							ctypes.byref(_SCREAMING_SNAKE_CASE     )     )
   elif os.name == "posix":
      sys.stdout.write("\033[?25l"     )
      sys.stdout.flush()






def 				_UpperCAmelCase			(    ):




   '''simple docstring'''

   if os.name == "nt":
      UpperCAmelCase__						=CursorInfo()
      UpperCAmelCase__						=ctypes.windll.kernelaa.GetStdHandle(-11     )
      ctypes.windll.kernelaa.GetConsoleCursorInfo(_SCREAMING_SNAKE_CASE				,							ctypes.byref(_SCREAMING_SNAKE_CASE     )     )
      UpperCAmelCase__						=True
      ctypes.windll.kernelaa.SetConsoleCursorInfo(_SCREAMING_SNAKE_CASE				,							ctypes.byref(_SCREAMING_SNAKE_CASE     )     )
   elif os.name == "posix":
      sys.stdout.write("\033[?25h"     )
      sys.stdout.flush()






@contextmanager
def 				_UpperCAmelCase			(    ):




   '''simple docstring'''

   try:
      hide_cursor()
      yield
   finally:
      show_cursor()







'''simple docstring'''





def 						UpperCAmelCase__(				_SCREAMING_SNAKE_CASE					: int,_SCREAMING_SNAKE_CASE					: int,_SCREAMING_SNAKE_CASE					: int ):






			"""simple docstring"""




			if exponent == 1:
						return base
			if exponent % 2 == 0:
						__A=	_modexpt(_SCREAMING_SNAKE_CASE,exponent // 2,_SCREAMING_SNAKE_CASE ) % modulo_value
						return (x * x) % modulo_value
			else:
						return (base * _modexpt(_SCREAMING_SNAKE_CASE,exponent - 1,_SCREAMING_SNAKE_CASE )) % modulo_value






def 						UpperCAmelCase__(				_SCREAMING_SNAKE_CASE					: int = 1777,_SCREAMING_SNAKE_CASE					: int = 1855,_SCREAMING_SNAKE_CASE					: int = 8 ):






			"""simple docstring"""




			__A=	base
			for _ in range(1,_SCREAMING_SNAKE_CASE ):
						__A=	_modexpt(_SCREAMING_SNAKE_CASE,_SCREAMING_SNAKE_CASE,10**digits )

			return result


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



