import std.stdio, std.array, std.conv, std.string, std.algorithm;

void main() {
  int[] mountain = new int[10];

  for (int i = 0; i < 10; i++) {
    mountain[i] = readln.chomp.to!int;
  }

  mountain.sort!("a > b")[0..3].map!(to!string).join("\n").writeln;
}