import std.stdio, std.string, std.algorithm, std.conv, std.range, std.math;

void main() {
  int[int] counter;

  foreach (string line; lines(stdin)) {
    int i = line.chomp.to!int;
    counter[i]++;
  }

  int max = counter.values.reduce!(max);

  foreach (k; counter.keys.sort) {
    if (counter[k] == max) k.writeln;
  }
}