let rec read_lines ic = 
  try let line = input_line ic in
    let line = int_of_string(line) in
    line :: read_lines ic
  with End_of_file -> [];;

let cmp a b = 
  if a < b then 1
  else -1;;

let heights = read_lines stdin;;

let heights = List.stable_sort cmp heights;;

print_endline(string_of_int(List.nth heights 0) );;
print_endline(string_of_int(List.nth heights 1) );;
print_endline(string_of_int(List.nth heights 2) );;