program zad1;
var a, b, c, la, lb, lc, g, h, P: Int64;
    i : Integer;
begin
    read (a, b, c);
    if a < b then
            begin
            P := a;
            a := b;
            b := P;
            end;
    if b < c then
            begin
            P := b;
            b := c;
            c := P;
            end;
    if a < b then
            begin
            P := a;
            a := b;
            b := P;
            end;
    P:=a;
    la := 1;
        while P >= 10 do
            begin
            P := P div 10;
            la := la + 1;
            end;
    P:=b;
    lb := 1;
        while P >= 10 do
            begin
            P := P div 10;
            lb := lb + 1;
            end;
    P:=c;
    lc := 1;
        while P >= 10 do
            begin
            P := P div 10;
            lc := lc + 1;
            end;
    g := b;
    h := c;
    P := 1;
    for i := 1 to lb - 1 do
            P := P * 10;
    for i := lb to la - 1 do
        g := 10 * g + (g div P) mod 10;
    P := 1;
    for i := 1 to lc - 1 do
            P := P * 10;
    for i := lc to la - 1 do
        h := 10 * h + (h div P) mod 10;
    if a > g then
        if a > h then
            if g > h then write (a, b, c)
            else write (a, c, b)
        else write (c, a, b)
    else 
        if a > h then write (b, a, c)
        else
        if g > h then write (b, c, a)
        else write (c, b, a);
end.