/ALARM - Đồng hồ báo thức

<Problem>

http://ntucoder.net/Problem/Details/5550
              Uses Crt;
        Var     n,i,j,k,l:longint;
                a:array[0..9] of integer = (6,2,5,5,4,5,6,3,7,6);
        Begin
                readln(n);
                for i:=0 to 2 do
                        for j:=0 to 9 do
                                for l:=0 to 5 do
                                        for k:=0 to 9 do
                                        if (a[i]+a[j]+a[l]+a[k]=n) then
                                        if (i*10+j<24) and (l*10+k<60) then
                                        begin
                                                writeln(i,j,':',l,k);
                                                exit;
                                        end;
                writeln('Impossible');
                readln;
        
        End.