#include <stdio.h>
int main(void){
int i,cnt,input,ret,buf[4];
cnt= 0; /* 何回目の入力かを示す */
while( ((ret
=scanf("%d",&input
))!=0) && (ret
!=EOF
) ){ /* 入力されるたび挿入ソートする ただし4番目に大きい数は比較しない*/
for(i=(cnt>3)?3:cnt;(i>0)&&(buf[i-1]<input);i--){
buf[i]=buf[i-1];
}
buf[i]=input;
cnt++;
/* 5回目の入力が終わったときソートされた3つの数字を表示 */
if(cnt>4){
printf("%d %d %d\n",buf
[0],buf
[1],buf
[2]); cnt=0;
}
}
return 0;
}
I2luY2x1ZGUgPHN0ZGlvLmg+CgppbnQgbWFpbih2b2lkKXsKICAgIGludCBpLGNudCxpbnB1dCxyZXQsYnVmWzRdOwogICAgCiAgICBjbnQ9IDA7IC8qIOS9leWbnuebruOBruWFpeWKm+OBi+OCkuekuuOBmSAqLwogICAgd2hpbGUoICgocmV0PXNjYW5mKCIlZCIsJmlucHV0KSkhPTApICYmIChyZXQhPUVPRikgKXsKICAgICAgICAvKiDlhaXlipvjgZXjgozjgovjgZ/jgbPmjL/lhaXjgr3jg7zjg4jjgZnjgosg44Gf44Gg44GXNOeVquebruOBq+Wkp+OBjeOBhOaVsOOBr+avlOi8g+OBl+OBquOBhCovCiAgICAgICAgZm9yKGk9KGNudD4zKT8zOmNudDsoaT4wKSYmKGJ1ZltpLTFdPGlucHV0KTtpLS0pewogICAgICAgICAgICBidWZbaV09YnVmW2ktMV07CiAgICAgICAgfQogICAgICAgIGJ1ZltpXT1pbnB1dDsKICAgICAgICAKICAgICAgICBjbnQrKzsKICAgICAgICAvKiA15Zue55uu44Gu5YWl5Yqb44GM57WC44KP44Gj44Gf44Go44GN44K944O844OI44GV44KM44GfM+OBpOOBruaVsOWtl+OCkuihqOekuiAqLwogICAgICAgIGlmKGNudD40KXsKICAgICAgICAgICAgcHJpbnRmKCIlZCAlZCAlZFxuIixidWZbMF0sYnVmWzFdLGJ1ZlsyXSk7CiAgICAgICAgICAgIGNudD0wOwogICAgICAgIH0KICAgIH0KCiAgICByZXR1cm4gMDsKfQo=