import java.util.Scanner;
public class Main
{
public static void main(String[] args){
Scanner sc = new Scanner(System.in);
int a = sc.nextInt();
int b = sc.nextInt();
int c = sc.nextInt();
int d = sc.nextInt();
int t;
if (a<b){
t=a;
a=b;
b=t;
}
if (a<c){
t=a;
a=c;
c=t;
}
if (a<d){
t=a;
a=d;
d=t;
}
if (b<c){
t=b;
b=c;
c=t;
}
if (b<d){
t=b;
b=d;
d=t;
}
if (c<d){
t=c;
c=d;
d=t;
}
System.out.println(a+" "+b+" "+c+" "+d);
}
}
/**************************************************************
Problem: 1705
User: admin
Language: Java
Result: Accepted
Time:1094 ms
Memory:42584 kb
****************************************************************/