#include <stdio.h>
int main()
{
    int a, b, c, d, temp;
    scanf("%d%d%d%d", &a, &b, &c,&d);
    if(a>b)
{
    temp=a;
    a=b;
    b=temp;
}
    if(a>c)
{
    temp=a;
    a=c;
    c=temp;
} 
    if(b>c)
{
    temp=b;
    b=c;
    c=temp;
}
    if(d>a)
{
    temp=d;
    d=a;
    a=temp;
}
    if(d>b)
{
    temp=d;
    d=b;
    b=temp;
}
    if(d>c)
{
    temp=d;
    d=c;
    c=temp;
}
    printf("%d %d %d\n", a, b, c,d);
    return 0;
}