fork(1) download
  1. # your code goes here
  2. n,m = map(int, input().split())
  3. person = [""] * 20001
  4. cnt = 0
  5. for i in range(m):
  6. a, b = map(int, input().split())
  7. person[a] = i + 1
  8. person[b] = i + 1
  9. for i in range(20001):
  10. if not person[i] == "":
  11. cnt += 1
  12. if cnt == n:
  13. print(person[i])
Success #stdin #stdout 0.04s 9688KB
stdin
10 2
1 3
2 4
stdout
Standard output is empty