





from collections import deque
def      _A       (		SCREAMING_SNAKE_CASE     :   List[str]						):





  """simple docstring"""



  a__	:					str										=len(SCREAMING_SNAKE_CASE						)
  a__	:					Tuple										=deque()
  a__	:					List[Any]										=[False for _ in range(SCREAMING_SNAKE_CASE						)]
  a__	:					int										=[-1 for _ in range(SCREAMING_SNAKE_CASE						)]
  a__	:					List[Any]										=index_of[:]

  def strong_connect(SCREAMING_SNAKE_CASE     :   int       ,       SCREAMING_SNAKE_CASE     :   List[str]       ,       SCREAMING_SNAKE_CASE     :   Tuple						):
    a__	:					Optional[int]										=index  # the number when this node is seen
    a__	:					Any										=index  # lowest rank node reachable from here
    index += 1
    stack.append(SCREAMING_SNAKE_CASE						)
    a__	:					Optional[Any]										=True

    for w in g[v]:
      if index_of[w] == -1:
        a__	:					Union[str, Any]										=strong_connect(SCREAMING_SNAKE_CASE       ,       SCREAMING_SNAKE_CASE       ,       SCREAMING_SNAKE_CASE						)
        a__	:					int										=(
            lowlink_of[w] if lowlink_of[w] < lowlink_of[v] else lowlink_of[v]
        )
      elif on_stack[w]:
        a__	:					Optional[int]										=(
            lowlink_of[w] if lowlink_of[w] < lowlink_of[v] else lowlink_of[v]
        )

    if lowlink_of[v] == index_of[v]:
      a__	:					Optional[int]										=[]
      a__	:					str										=stack.pop()
      a__	:					Any										=False
      component.append(SCREAMING_SNAKE_CASE						)
      while w != v:
        a__	:					str										=stack.pop()
        a__	:					Tuple										=False
        component.append(SCREAMING_SNAKE_CASE						)
      components.append(SCREAMING_SNAKE_CASE						)
    return index

  a__	:					Optional[Any]										=[]
  for v in range(SCREAMING_SNAKE_CASE						):
    if index_of[v] == -1:
      strong_connect(SCREAMING_SNAKE_CASE       ,       0       ,       SCREAMING_SNAKE_CASE						)

  return components
def      _A       (		SCREAMING_SNAKE_CASE     :   Dict       ,       SCREAMING_SNAKE_CASE     :   int						):





  """simple docstring"""



  a__	:					Any										=[[] for _ in range(SCREAMING_SNAKE_CASE						)]
  for u, v in edges:
    g[u].append(SCREAMING_SNAKE_CASE						)
  return g


if __name__ == "__main__":
     # Test
     UpperCAmelCase	:	int		     =       7
     UpperCAmelCase	:	Union[str, Any]		     =       [0, 0, 1, 2, 3, 3, 4, 4, 6]
     UpperCAmelCase	:	Optional[Any]		     =       [1, 3, 2, 0, 1, 4, 5, 6, 5]
     UpperCAmelCase	:	Tuple		     =       [(u, v) for u, v in zip(source, target)]
     UpperCAmelCase	:	Any		     =       create_graph(n_vertices, edges)

     assert [[5], [6], [4], [3, 2, 1, 0]] == tarjan(g)













def      _A       (		SCREAMING_SNAKE_CASE     :   int = 50						):





  """simple docstring"""



  a__	:					Any										=[1] * (length + 1)

  for row_length in range(3       ,       length + 1						):
    for block_length in range(3       ,       row_length + 1						):
      for block_start in range(row_length - block_length						):
        ways_number[row_length] += ways_number[
            row_length - block_start - block_length - 1
        ]

      ways_number[row_length] += 1

  return ways_number[length]


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






