from collections import deque


def SCREAMING_SNAKE_CASE					(  lowercase_:						Optional[Any]					):
       return input(lowercase_					).strip().split(' '					)


def SCREAMING_SNAKE_CASE					(  lowercase_:						int		,    lowercase_:						int					):
       _UpperCamelCase  :							dict[int, list[int]]	    =	{}
       for i in range(lowercase_					):
              _UpperCamelCase  :							List[str]	    =	[]

       for e in range(lowercase_					):
              _UpperCamelCase    ,   _UpperCamelCase  :							Dict	    =	(int(lowercase_					) for i in _input(F"Edge {e + 1}: <node1> <node2> "					))
              graph[x].append(lowercase_					)
       return graph


def SCREAMING_SNAKE_CASE					(  lowercase_:						int		,    lowercase_:						int					):
       _UpperCamelCase  :							dict[int, list[int]]	    =	{}
       for i in range(lowercase_					):
              _UpperCamelCase  :							Optional[Any]	    =	[]

       for e in range(lowercase_					):
              _UpperCamelCase    ,   _UpperCamelCase  :							Tuple	    =	(int(lowercase_					) for i in _input(F"Edge {e + 1}: <node1> <node2> "					))
              graph[x].append(lowercase_					)
              graph[y].append(lowercase_					)
       return graph


def SCREAMING_SNAKE_CASE					(  lowercase_:						int		,    lowercase_:						int					):
       _UpperCamelCase  :							dict[int, list[tuple[int, int]]]	    =	{}
       for i in range(lowercase_					):
              _UpperCamelCase  :							List[Any]	    =	[]

       for e in range(lowercase_					):
              _UpperCamelCase    ,   _UpperCamelCase    ,   _UpperCamelCase  :							Optional[Any]	    =	(int(lowercase_					) for i in _input(F"Edge {e + 1}: <node1> <node2> <weight> "					))
              graph[x].append((y, w)					)
              graph[y].append((x, w)					)
       return graph


if __name__ == "__main__":
 UpperCAmelCase		,       UpperCAmelCase      		=					(int(i) for i in _input('''Number of nodes and edges: '''))

 UpperCAmelCase      		=					int(
     _input(
         '''Press 1 or 2 or 3 \n'''
         '''1. Unweighted directed \n'''
         '''2. Unweighted undirected \n'''
         '''3. Weighted undirected \n'''
     )[0]
 )

 UpperCAmelCase      		=					{
     1: initialize_unweighted_directed_graph,
     2: initialize_unweighted_undirected_graph,
     3: initialize_weighted_undirected_graph,
 }[graph_choice](n, m)


def SCREAMING_SNAKE_CASE					(  lowercase_:						Tuple		,    lowercase_:						Dict					):
       _UpperCamelCase    ,   _UpperCamelCase  :							Dict	    =	{s}, [s]
       print(lowercase_					)
       while _s:
              _UpperCamelCase  :							Union[str, Any]	    =	0
              for i in g[_s[-1]]:
                     if i not in vis:
                            _s.append(lowercase_					)
                            vis.add(lowercase_					)
                            _UpperCamelCase  :							str	    =	1
                            print(lowercase_					)
                            break
              if not flag:
                     _s.pop()


def SCREAMING_SNAKE_CASE					(  lowercase_:						Optional[Any]		,    lowercase_:						str					):
       _UpperCamelCase    ,   _UpperCamelCase  :							Optional[int]	    =	{s}, deque([s]					)
       print(lowercase_					)
       while q:
              _UpperCamelCase  :							int	    =	q.popleft()
              for v in g[u]:
                     if v not in vis:
                            vis.add(lowercase_					)
                            q.append(lowercase_					)
                            print(lowercase_					)


def SCREAMING_SNAKE_CASE					(  lowercase_:						Optional[int]		,    lowercase_:						List[str]					):
       _UpperCamelCase    ,   _UpperCamelCase    ,   _UpperCamelCase  :							str	    =	{s: 0}, set(), {s: 0}
       while True:
              if len(lowercase_					) == len(lowercase_					) - 1:
                     break
              _UpperCamelCase  :							Union[str, Any]	    =	100000
              for i in dist:
                     if i not in known and dist[i] < mini:
                            _UpperCamelCase  :							Any	    =	dist[i]
                            _UpperCamelCase  :							List[Any]	    =	i
              known.add(lowercase_					)
              for v in g[u]:
                     if v[0] not in known and dist[u] + v[1] < dist.get(v[0]		,    100000					):
                            _UpperCamelCase  :							Optional[Any]	    =	dist[u] + v[1]
                            _UpperCamelCase  :							Tuple	    =	u
       for i in dist:
              if i != s:
                     print(dist[i]					)


def SCREAMING_SNAKE_CASE					(  lowercase_:						Optional[int]		,    lowercase_:						Union[str, Any]=None		,    lowercase_:						Union[str, Any]=None					):
       if q is None:
              _UpperCamelCase  :							Any	    =	[1]
       if ind is None:
              _UpperCamelCase  :							Tuple	    =	[0] * (len(lowercase_					) + 1)  # SInce oth Index is ignored
              for u in g:
                     for v in g[u]:
                            ind[v] += 1
              _UpperCamelCase  :							Union[str, Any]	    =	deque()
              for i in g:
                     if ind[i] == 0:
                            q.append(lowercase_					)
       if len(lowercase_					) == 0:
              return
       _UpperCamelCase  :							Optional[Any]	    =	q.popleft()
       print(lowercase_					)
       for w in g[v]:
              ind[w] -= 1
              if ind[w] == 0:
                     q.append(lowercase_					)
       topo(lowercase_		,    lowercase_		,    lowercase_					)


def SCREAMING_SNAKE_CASE					(  ):
       _UpperCamelCase  :							Tuple	    =	input().strip()
       _UpperCamelCase  :							Any	    =	[]
       for _ in range(lowercase_					):
              a.append(map(lowercase_		,    input().strip().split()					)					)
       return a, n


def SCREAMING_SNAKE_CASE					(  lowercase_:						Any					):
       ((_UpperCamelCase)    ,   (_UpperCamelCase))  :							List[Any]	    =	a_and_n
       _UpperCamelCase  :							str	    =	list(lowercase_					)
       _UpperCamelCase  :							Dict	    =	[[0] * n for i in range(lowercase_					)]
       for k in range(lowercase_					):
              for i in range(lowercase_					):
                     for j in range(lowercase_					):
                            if dist[i][j] > dist[i][k] + dist[k][j]:
                                   _UpperCamelCase  :							Any	    =	dist[i][k] + dist[k][j]
                                   _UpperCamelCase  :							Optional[int]	    =	k
       print(lowercase_					)


def SCREAMING_SNAKE_CASE					(  lowercase_:						List[Any]		,    lowercase_:						int					):
       _UpperCamelCase    ,   _UpperCamelCase    ,   _UpperCamelCase  :							int	    =	{s: 0}, set(), {s: 0}
       while True:
              if len(lowercase_					) == len(lowercase_					) - 1:
                     break
              _UpperCamelCase  :							Dict	    =	100000
              for i in dist:
                     if i not in known and dist[i] < mini:
                            _UpperCamelCase  :							Tuple	    =	dist[i]
                            _UpperCamelCase  :							List[Any]	    =	i
              known.add(lowercase_					)
              for v in g[u]:
                     if v[0] not in known and v[1] < dist.get(v[0]		,    100000					):
                            _UpperCamelCase  :							Dict	    =	v[1]
                            _UpperCamelCase  :							Union[str, Any]	    =	u
       return dist


def SCREAMING_SNAKE_CASE					(  ):
       _UpperCamelCase    ,   _UpperCamelCase  :							Any	    =	map(lowercase_		,    input().split(' '					)					)
       _UpperCamelCase  :							List[str]	    =	[]
       for _ in range(lowercase_					):
              edges.append(map(lowercase_		,    input().split(' '					)					)					)
       return edges, n


def SCREAMING_SNAKE_CASE					(  lowercase_:						Tuple					):
       # Sort edges on the basis of distance
       ((_UpperCamelCase)    ,   (_UpperCamelCase))  :							int	    =	e_and_n
       e.sort(reverse=lowercase_		,    key=lambda lowercase_					: x[2]					)
       _UpperCamelCase  :							Dict	    =	[{i} for i in range(1		,    n + 1					)]
       while True:
              if len(lowercase_					) == 1:
                     break
              print(lowercase_					)
              _UpperCamelCase  :							Optional[int]	    =	e.pop()
              for i in range(len(lowercase_					)					):
                     if x[0] in s[i]:
                            break
              for j in range(len(lowercase_					)					):
                     if x[1] in s[j]:
                            if i == j:
                                   break
                            s[j].update(s[i]					)
                            s.pop(lowercase_					)
                            break





def SCREAMING_SNAKE_CASE					(  lowercase_:						List[Any]					):
       _UpperCamelCase  :							Dict	    =	[]
       for node in graph:
              if not graph[node]:
                     isolated.append(lowercase_					)
       return isolated




'''simple docstring'''





from itertools import count
from math import asin, pi, sqrt






def SCREAMING_SNAKE_CASE__  (				snake_case       :				float  )   ->				float:







     """simple docstring"""
     return (
         (1 - 2 * point) * sqrt(point - point**2  ) + 2 * point + asin(sqrt(1 - point  )  )
     ) / 4






def SCREAMING_SNAKE_CASE__  (				snake_case       :				int  )   ->				float:







     """simple docstring"""
     a					:							List[str]							= (circles_number + 1 - sqrt(2 * circles_number  )) / (
         2 * (circles_number**2 + 1)
     )
     a					:							int							= circles_number * intersection_y

     a					:							List[Any]							= intersection_x * intersection_y / 2
     a					:							List[str]							= circle_bottom_arc_integral(
         1 / 2  ) - circle_bottom_arc_integral(snake_case  )

     return triangle_area + concave_region_area






def SCREAMING_SNAKE_CASE__  (				snake_case       :				float = 1 / 1_000  )   ->				int:







     """simple docstring"""
     a					:							str							= (1 - pi / 4) / 4

     for n in count(1  ):
          if concave_triangle_area(snake_case  ) / l_section_area < fraction:
               return n

     return -1


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

