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
  
  stdin = sys.stdin
  
  ni = lambda: int(ns())
  na = lambda: list(map(int, stdin.readline().split()))
  ns = lambda: stdin.readline().rstrip()  # ignore trailing spaces
  
  n, m = na()
  g = [[False] * n for _ in range(n)]
  gs = [[] for _ in range(n)]
  for i in range(m):
      s, t = na()
      gs[s - 1].append(t - 1)
      g[s - 1][t - 1] = True
  
  ans = 999999
  best = None
  for i in range(n):
      ds = [9999999] * n
      prevs = [-1] * n
      ds[i] = 0
      q = [i]
      qp = 0
      while qp < len(q):
          cur = q[qp]
          qp += 1
          for e in gs[cur]:
              if ds[e] > ds[cur] + 1:
                  ds[e] = ds[cur] + 1
                  prevs[e] = cur
                  q.append(e)
      for j in range(n):
          if g[j][i]:
              if ds[j] + 1 < ans:
                  ans = ds[j] + 1
                  best = [0] * (ds[j] + 1)
                  best[0] = i
                  cur = j
                  r = -1
                  while cur != i:
                      best[r] = cur
                      r -= 1
                      cur = prevs[cur]
  
  if not best:
      print(-1)
  else:
      print(ans)
      for x in best:
          print(x + 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"}]