import std.stdio,std.algorithm;
void main(){
	int in;
	int[] ins;
	while(){
		in = to!int(chomp(readln()));
		if( in ){
			ins ~= in;
		}else{
break;
}
	}
	sort!("a > b")(ins);
	writeln( ins[0] );
	writeln( ins[1] );
	writeln( ins[2] );
}