

from __future__ import annotations







def      snake_case__							(  lowerCAmelCase_     ):





     """simple docstring"""







     global graph, reversed_graph, scc, component, visit, stack
     if visit[u]:
          return
     SCREAMING_SNAKE_CASE 		=True
     for v in graph[u]:
          dfs(lowerCAmelCase_     )
     stack.append(lowerCAmelCase_     )







def      snake_case__							(  lowerCAmelCase_     ):





     """simple docstring"""







     global graph, reversed_graph, scc, component, visit, stack
     if visit[u]:
          return
     SCREAMING_SNAKE_CASE 		=True
     component.append(lowerCAmelCase_     )
     for v in reversed_graph[u]:
          dfsa(lowerCAmelCase_     )







def      snake_case__							(  ):





     """simple docstring"""







     global graph, reversed_graph, scc, component, visit, stack
     for i in range(lowerCAmelCase_     ):
          dfs(lowerCAmelCase_     )
     SCREAMING_SNAKE_CASE 		=[False] * n
     for i in stack[::-1]:
          if visit[i]:
               continue
          SCREAMING_SNAKE_CASE 		=[]
          dfsa(lowerCAmelCase_     )
          scc.append(lowerCAmelCase_     )
     return scc


if __name__ == "__main__":
 # n - no of nodes, m - no of edges
 _lowerCamelCase			,					_lowerCamelCase							=list(map(int, input().strip().split()))

 _lowerCamelCase							=[[] for _ in range(n)]  # graph
 _lowerCamelCase							=[[] for i in range(n)]  # reversed graph
 # input graph data (edges)
 for _ in range(m):
  _lowerCamelCase			,					_lowerCamelCase							=list(map(int, input().strip().split()))
  graph[u].append(v)
  reversed_graph[v].append(u)

 _lowerCamelCase							=[]
 _lowerCamelCase							=[False] * n
 _lowerCamelCase							=[]
 _lowerCamelCase							=[]
 print(kosaraju())




import numpy as np







def      snake_case__							(  lowerCAmelCase_     ):





     """simple docstring"""







     SCREAMING_SNAKE_CASE 		=np.exp(lowerCAmelCase_     )

     # Add up the all the exponentials
     SCREAMING_SNAKE_CASE 		=np.sum(lowerCAmelCase_     )

     # Divide every exponent by the sum of all exponents
     SCREAMING_SNAKE_CASE 		=exponent_vector / sum_of_exponents

     return softmax_vector


if __name__ == "__main__":
 print(softmax((0,)))

