


"""simple docstring"""





from __future__ import annotations


def   _snake_case    (    _snake_case					:      List[str]      ):
      global graph, reversed_graph, scc, component, visit, stack
      if visit[u]:
            return
      lowerCAmelCase       :						Optional[Any]							= True
      for v in graph[u]:
            dfs(_snake_case      )
      stack.append(_snake_case      )


def   _snake_case    (    _snake_case					:      List[str]      ):
      global graph, reversed_graph, scc, component, visit, stack
      if visit[u]:
            return
      lowerCAmelCase       :						Dict							= True
      component.append(_snake_case      )
      for v in reversed_graph[u]:
            dfsa(_snake_case      )


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


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

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

 snake_case__		:  Tuple     					=					[]
 snake_case__		:  Union[str, Any]     					=					[False] * n
 snake_case__		:  Tuple     					=					[]
 snake_case__		:  Dict     					=					[]
 print(kosaraju())








import requests

try:
							from django.contrib.auth import authenticate, login
							from django.shortcuts import redirect, render
except ImportError:
							UpperCamelCase__						=		UpperCamelCase__						=		UpperCamelCase__						=		UpperCamelCase__						=		print






def    snake_case   (				A     )				->				List[str]:




	'''simple docstring'''


	lowerCamelCase_				:						Optional[int]				  =				'secretKey'
	lowerCamelCase_				:						str				  =				'https://www.google.com/recaptcha/api/siteverify'

	# when method is not POST, direct user to login page
	if request.method != "POST":
		return render(A		,  'login.html'     )

	# from the frontend, get username, password, and client_key
	lowerCamelCase_				:						int				  =				request.POST.get('username'     )
	lowerCamelCase_				:						str				  =				request.POST.get('password'     )
	lowerCamelCase_				:						List[Any]				  =				request.POST.get('g-recaptcha-response'     )

	# post recaptcha response to Google's recaptcha api
	lowerCamelCase_				:						Union[str, Any]				  =				requests.post(A		,  data={'secret': secret_key, 'response': client_key}     )
	# if the recaptcha api verified our keys
	if response.json().get('success'		,  A     ):
		# authenticate the user
		lowerCamelCase_				:						int				  =				authenticate(A		,  username=A		,  password=A     )
		if user_in_database:
			login(A		,  A     )
			return redirect('/your-webpage'     )
	return render(A		,  'login.html'     )
