#include<stdio.h>
void swap(int *pa,int *pb) //这个函数必须写到主函数前 ,否则需要在主函数声明。
{
int t;
t=*pa;
*pa=*pb;
*pb=t;
}
int main( )
{
int a,b,c,d,i,*e,*f,*g,*h;
scanf("%d%d%d%d",&a,&b,&c,&d);
e=&a;
f=&b;
g=&c;
h=&d;
for(i=0;i<3;i++) //最多只需换三次。
{
if(a<b) swap(e,f); //不能使用*e,*f。
if(b<c) swap(f,g);
if(c<d) swap(g,h);
}
printf("%d %d %d %d",a,b,c,d);
return 0;
}