program zad1;
var a, b, c, la, lb, lc, f, g, h, d: Int64;
    i : Integer;
    procedure sort (x, y : Int64);
        var P: Int64;
        begin
        if x < y then
            begin
            P := x;
            x := y;
            y := P;
            end;
        end;
    function power (l1: Integer): Int64;
        var i : integer;
            w : Int64;
        begin
        w := 10;
        for i := 1 to l1 do
            w := w * 10;
        end;
    function length (n: Int64): Integer;
        var k: Integer;
        begin
        k := 0;
        while n >= 10 do
            begin
            n := n div 10;
            k := k + 1;
            end;
        end;
begin
    read (a, b, c);
    sort (a, b);
    sort (b, c);
    sort (a, b);
    write (a, b, c);
    la := length (a) + 1;
    lb := length (b) + 1;
    lc := length (c) + 1;
    g := b;
    h := c;
    f := power(lb - 1);
    for i := lb to la do
        g := 10 * g + g mod f;
    f := power(lc - 1);
    for i := lc to la do
        h := 10 * h + h mod f;
    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.