output_description: Print the probability that a is odd. Your output will be considered correct
  when its absolute or relative error from the judge's output is at most
  10^{-6}.
  
  * * *
input_description: Input is given from Standard Input in the following format:
  
      
      
      N
attempt: import sys
  
  sys.setrecursionlimit(10**6)
  
  n, m = map(int, input().split())
  e = [[] for _ in range(n)]
  
  for _ in range(m):
      a, b = map(int, input().split())
      e[a - 1].append(b - 1)
  
  c = [0] * n
  
  
  def search_path(p, temp):
      c[p] = 1
      for x in e[p]:
          if x in temp:
              ans = [] + temp[temp.index(x) :]
              check = 1
              while check == 1:
                  check = 0
                  # print(ans)
                  for i in range(len(ans) - 1):
                      for z in e[ans[i]]:
                          if z == ans[i + 1]:
                              continue
                          elif z in ans:
                              t = ans.index(z)
                              if t < i:
                                  ans = [] + ans[t : i + 1]
                              else:
                                  ans = [] + ans[i : t + 1]
                              # print(ans, z)
                              check = 1
                              break
                      if check == 1:
                          break
                      else:
                          e[ans[i]] = []
                  if check == 1:
                      continue
                  for z in e[ans[-1]]:
                      if z == ans[0]:
                          continue
                      elif z in ans:
                          ans = [] + ans[ans.index(z) :]
                          check = 1
                          # print(z, ans)
                          break
              print(len(ans))
              for z in ans:
                  print(z + 1)
              exit()
          else:
              search_path(x, temp + [x])
  
  
  t = 1
  for i in range(n):
      if c[i] == 0:
          ans = search_path(i, [i])
  
  print(-1)
  
problem_description: Statement
  
  Given is an integer N.
  
  Takahashi chooses an integer a from the positive integers not greater than N
  with equal probability.
  
  Find the probability that a is odd.
samples: [{"input": "4", "output": "0.5000000000\n    \n\nThere are four positive integers not greater than 4: 1, 2, 3, and 4. Among\nthem, we have two odd numbers: 1 and 3. Thus, the answer is \\frac{2}{4} = 0.5.\n\n* * *"}, {"input": "5", "output": "0.6000000000\n    \n\n* * *"}, {"input": "1", "output": "1.0000000000"}]