






"""simple docstring"""


lowercase_				     =     [
    (1000, 'M'),
    (900, 'CM'),
    (500, 'D'),
    (400, 'CD'),
    (100, 'C'),
    (90, 'XC'),
    (50, 'L'),
    (40, 'XL'),
    (10, 'X'),
    (9, 'IX'),
    (5, 'V'),
    (4, 'IV'),
    (1, 'I'),
]



def 					lowerCAmelCase				(    __UpperCamelCase ):




  """simple docstring"""







  __A									= {'''I''': 1, '''V''': 5, '''X''': 1_0, '''L''': 5_0, '''C''': 1_0_0, '''D''': 5_0_0, '''M''': 1_0_0_0}
  __A									= 0
  __A									= 0
  while place < len(__UpperCamelCase ):
    if (place + 1 < len(__UpperCamelCase )) and (vals[roman[place]] < vals[roman[place + 1]]):
      total += vals[roman[place + 1]] - vals[roman[place]]
      place += 2
    else:
      total += vals[roman[place]]
      place += 1
  return total



def 					lowerCAmelCase				(    __UpperCamelCase ):




  """simple docstring"""







  __A									= []
  for arabic, roman in ROMAN:
    ((__A)			,    (__A))									= divmod(__UpperCamelCase		,       __UpperCamelCase )
    result.append(roman * factor )
    if number == 0:
      break
  return "".join(__UpperCamelCase )


if __name__ == "__main__":
       import doctest

       doctest.testmod()












"""simple docstring"""


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

          A_						:	List[str]						 = [("size", ctypes.c_int), ("visible", ctypes.c_byte)]



def 					lowerCAmelCase				(    ):




  """simple docstring"""







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



def 					lowerCAmelCase				(    ):




  """simple docstring"""







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





@contextmanager
def 					lowerCAmelCase				(    ):




  """simple docstring"""







  try:
    hide_cursor()
    yield
  finally:
    show_cursor()




