#include<iostream>
 using namespace std;
int main()
{
  int a,b,c,d,e,f,g,h,i,j,x,y,z;
  while(cin>>a,b,c,d,e,f,g,h,i,j)
  {
	  if(a>0)x=a;
	  if(b>a)x=b;
	  if(c>a)x=c;
	  if(d>a)x=d;
	  if(e>a)x=e;
	  if(f>a)x=f;
	  if(g>a)x=g;
	  if(h>a)x=h;
	  if(i>a)x=i;
	  if(j>a)x=j;
	   if(a>0&&a<x)y=a;
	  if(b>a&&b<x)y=b;
	  if(c>a&&c<x)y=c;
	  if(d>a&&d<x)y=d;
	  if(e>a&&e<x)y=e;
	  if(f>a&&f<x)y=f;
	  if(g>a&&g<x)y=g;
	  if(h>a&&h<x)y=h;
	  if(i>a&&i<x)y=i;
	  if(j>a&&j<x)y=j;
	   if(a>0&&a<x,y)z=a;
	  if(b>a&&b<x,y)z=b;
	  if(c>a&&c<x,y)z=c;
	  if(d>a&&d<x,y)z=d;
	  if(e>a&&e<x,y)z=e;
	  if(f>a&&f<x,y)z=f;
	  if(g>a&&g<x,y)z=g;
	  if(h>a&&h<x,y)z=h;
	  if(i>a&&i<x,y)z=i;
	  if(j>a&&j<x,y)z=j;
	  cout<<x<<endl;
	  cout<<y<<endl;
	  cout<<z<<endl;
  }
	return 0;
}