fork(1) download
  1. import sys
  2.  
  3. a, b, c = [], {}, []
  4. [a.extend(i.split()) for i in sys.stdin] and a.remove(a[0])
  5. for i in a:
  6. b[i] = b.get(i, 0) + 1
  7. {c.append(i) for i, j in b.items() if j == max(b.values())} \
  8. and print(min(c), end='')
  9.  
Success #stdin #stdout 0.01s 28384KB
stdin
Standard input is empty
stdout
Standard output is empty