
"""simple docstring"""
lowercase_       :						Dict     					=	[4, 1, 7, 4, 2, 6, 4, 1, 5, 3, 7, 5]
lowercase_       :						Union[str, Any]     					=	[3, 7, 7, 4, 2, 6, 4, 1, 5, 3, 7, 5]
lowercase_       :						str     					=	{
    0: '''Sunday''',
    1: '''Monday''',
    2: '''Tuesday''',
    3: '''Wednesday''',
    4: '''Thursday''',
    5: '''Friday''',
    6: '''Saturday''',
}





def    _lowerCAmelCase    (     lowerCamelCase__							:							int,						lowerCamelCase__							:							int,						lowerCamelCase__							:							int				)  ->    str:
  assert len(str(lowerCamelCase__				)				) > 2, "year should be in YYYY format"
  assert 1 <= month <= 1_2, "month should be between 1 to 12"
  assert 1 <= day <= 3_1, "day should be between 1 to 31"

  # Doomsday algorithm:
  _SCREAMING_SNAKE_CASE   :				Optional[int]							    = year // 1_0_0
  _SCREAMING_SNAKE_CASE   :				Optional[Any]							    = (5 * (century % 4) + 2) % 7
  _SCREAMING_SNAKE_CASE   :				List[str]							    = year % 1_0_0
  _SCREAMING_SNAKE_CASE   :				str							    = centurian % 1_2
  _SCREAMING_SNAKE_CASE   :				Optional[Any]							    = (
      (centurian // 1_2) + centurian_m + (centurian_m // 4) + century_anchor
  ) % 7
  _SCREAMING_SNAKE_CASE   :				str							    = (
      DOOMSDAY_NOT_LEAP[month - 1]
      if (year % 4 != 0) or (centurian == 0 and (year % 4_0_0) == 0)
      else DOOMSDAY_LEAP[month - 1]
  )
  _SCREAMING_SNAKE_CASE   :				Union[str, Any]							    = (dooms_day + day - day_anchor) % 7
  return WEEK_DAY_NAMES[week_day]


if __name__ == "__main__":
      import doctest

      doctest.testmod()





"""simple docstring"""
from typing import List

from .keymap import KEYMAP, get_character





def    _lowerCAmelCase    (     lowerCamelCase__							:							str				)  ->    Optional[int]:

  def decorator(lowerCamelCase__							:							int				):
    _SCREAMING_SNAKE_CASE   :				Optional[int]							    = getattr(lowerCamelCase__,						"handle_key",						[]				)
    handle += [key]
    setattr(lowerCamelCase__,						"handle_key",						lowerCamelCase__				)
    return func

  return decorator





def    _lowerCAmelCase    (     *lowerCamelCase__							:							List[str]				)  ->    Tuple:

  def decorator(lowerCamelCase__							:							Dict				):
    _SCREAMING_SNAKE_CASE   :				List[Any]							    = getattr(lowerCamelCase__,						"handle_key",						[]				)
    handle += keys
    setattr(lowerCamelCase__,						"handle_key",						lowerCamelCase__				)
    return func

  return decorator
class 			UpperCamelCase      (							__SCREAMING_SNAKE_CASE  ):
     def __new__(     cls  ,     snake_case__  ,     snake_case__  ,     snake_case__				):




       """simple docstring"""


       _SCREAMING_SNAKE_CASE   :				Tuple							    = super().__new__(cls  ,     snake_case__  ,     snake_case__  ,     snake_case__				)
       if not hasattr(snake_case__  ,     "key_handler"				):
         setattr(snake_case__  ,     "key_handler"  ,     {}				)
       setattr(snake_case__  ,     "handle_input"  ,     KeyHandler.handle_input				)

       for value in attrs.values():
         _SCREAMING_SNAKE_CASE   :				Union[str, Any]							    = getattr(snake_case__  ,     "handle_key"  ,     []				)
         for key in handled_keys:
           _SCREAMING_SNAKE_CASE   :				Tuple							    = value
       return new_cls




     @staticmethod
     def 				__SCREAMING_SNAKE_CASE							(     cls				):




       """simple docstring"""


       _SCREAMING_SNAKE_CASE   :				Any							    = get_character()
       if char != KEYMAP["undefined"]:
         _SCREAMING_SNAKE_CASE   :				Dict							    = ord(snake_case__				)
       _SCREAMING_SNAKE_CASE   :				Union[str, Any]							    = cls.key_handler.get(snake_case__				)
       if handler:
         _SCREAMING_SNAKE_CASE   :				Optional[int]							    = char
         return handler(cls				)
       else:
         return None





def    _lowerCAmelCase    (     cls							:							List[Any]				)  ->    str:
  return KeyHandler(cls.__name__,						cls.__bases__,						cls.__dict__.copy()				)



