import sys

sys.set_int_max_str_digits(0)  # type: ignore



def 			A__						(  lowercase_    :  int	)     ->       bool:
   __lowerCamelCase								=				[0] * 11
   __lowerCamelCase								=				[0] * 11

   # mark last 9 numbers
   for _ in range(9	):
      __lowerCamelCase								=				1
      __lowerCamelCase								=				number // 10
   # flag
   __lowerCamelCase								=				True

   # check last 9 numbers for pandigitality

   for x in range(9	):
      if not check_last[x + 1]:
         __lowerCamelCase								=				False
   if not f:
      return f

   # mark first 9 numbers
   __lowerCamelCase								=				int(str(lowercase_	)[:9]	)

   for _ in range(9	):
      __lowerCamelCase								=				1
      __lowerCamelCase								=				number // 10

   # check first 9 numbers for pandigitality

   for x in range(9	):
      if not check_front[x + 1]:
         __lowerCamelCase								=				False
   return f



def 			A__						(  lowercase_    :  int	)     ->       bool:
   __lowerCamelCase								=				[0] * 11

   # mark last 9 numbers
   for _ in range(9	):
      __lowerCamelCase								=				1
      __lowerCamelCase								=				number // 10
   # flag
   __lowerCamelCase								=				True

   # check last 9 numbers for pandigitality

   for x in range(9	):
      if not check_last[x + 1]:
         __lowerCamelCase								=				False
   return f



def 			A__						(  )     ->       int:
   __lowerCamelCase								=				1
   __lowerCamelCase								=				1
   __lowerCamelCase								=				2
   # temporary Fibonacci numbers

   __lowerCamelCase								=				1
   __lowerCamelCase								=				1
   __lowerCamelCase								=				2
   # temporary Fibonacci numbers mod 1e9

   # mod m=1e9, done for fast optimisation
   __lowerCamelCase								=				[0] * 1000000
   __lowerCamelCase								=				1000000000

   for x in range(1000000	):
      __lowerCamelCase								=				(aa + ba) % m
      __lowerCamelCase								=				ba % m
      __lowerCamelCase								=				ca % m
      if checka(lowercase_	):
         __lowerCamelCase								=				1

   for x in range(1000000	):
      __lowerCamelCase								=				a + b
      __lowerCamelCase								=				b
      __lowerCamelCase								=				c
      # perform check only if in tocheck
      if tocheck[x + 3] and check(lowercase_	):
         return x + 3  # first 2 already done
   return -1


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







"""simple docstring"""







_SCREAMING_SNAKE_CASE  :		Optional[Any]        =      {
    0: '''underwear''',
    1: '''pants''',
    2: '''belt''',
    3: '''suit''',
    4: '''shoe''',
    5: '''socks''',
    6: '''shirt''',
    7: '''tie''',
    8: '''watch''',
}

_SCREAMING_SNAKE_CASE  :		List[str]        =      [[1, 4], [2, 4], [3], [], [], [4], [2, 7], [3], []]

_SCREAMING_SNAKE_CASE  :		Optional[Any]        =      [0 for x in range(len(graph))]
_SCREAMING_SNAKE_CASE  :		List[Any]        =      []



def 			A__						(  lowercase_    :  Optional[int]			,   lowercase_    :  List[str]	)     ->       List[str]:
   __lowerCamelCase								=				1
   while stack:
      __lowerCamelCase								=				stack.pop()
      print(lowercase_			,   clothes[current_clothing]	)
      order += 1



def 			A__						(  lowercase_    :  List[Any]			,   lowercase_    :  List[str]			,   lowercase_    :  Union[str, Any]	)     ->       List[Any]:
   __lowerCamelCase								=				1
   for v in graph[u]:
      if not visited[v]:
         depth_first_search(lowercase_			,   lowercase_			,   lowercase_	)

   stack.append(lowercase_	)



def 			A__						(  lowercase_    :  Dict			,   lowercase_    :  Optional[Any]	)     ->       Union[str, Any]:
   for v in range(len(lowercase_	)	):
      if not visited[v]:
         depth_first_search(lowercase_			,   lowercase_			,   lowercase_	)


if __name__ == "__main__":
     topological_sort(graph, visited)
     print(stack)
     print_stack(stack, clothes)






