program compFourNums;
var
a, b, c, d: smallint;
procedure swap(var x, y: smallint);
var temp:smallint;
begin
temp := x;
x := y;
y := temp;
end;
begin
readln(a, b, c, d);
if c<d then swap(c, d);
if b<c then swap(b, c);
if a<b then swap(a, b);
if c<d then swap(c, d);
if b<c then swap(b, c);
if c<d then swap(c, d);
writeln(a, ' ', b, ' ', c, ' ', d);
end.
cHJvZ3JhbSBjb21wRm91ck51bXM7CnZhcgogIGEsIGIsIGMsIGQ6IHNtYWxsaW50OwoKcHJvY2VkdXJlIHN3YXAodmFyIHgsIHk6IHNtYWxsaW50KTsKdmFyIHRlbXA6c21hbGxpbnQ7CmJlZ2luCnRlbXAgOj0geDsKeCA6PSB5Owp5IDo9IHRlbXA7CmVuZDsKCmJlZ2luCnJlYWRsbihhLCBiLCBjLCBkKTsKaWYgYzxkIHRoZW4gc3dhcChjLCBkKTsKaWYgYjxjIHRoZW4gc3dhcChiLCBjKTsKaWYgYTxiIHRoZW4gc3dhcChhLCBiKTsKaWYgYzxkIHRoZW4gc3dhcChjLCBkKTsKaWYgYjxjIHRoZW4gc3dhcChiLCBjKTsKaWYgYzxkIHRoZW4gc3dhcChjLCBkKTsKd3JpdGVsbihhLCAnICcsICBiLCAnICcsICBjLCAnICcsIGQpOwplbmQu