/DISC0 - Đĩa nhạc (dễ)

<Problem>

http://ntucoder.net/Problem/Details/1154
              Uses Crt;
        Type arr=array[1..1000] of longint;
        Var a:arr; t:array[1..1000] of boolean;
            n,m,i:longint;
        Begin
            readln(n,m);
            for i:=1 to m do read(a[i]);
            fillchar(t,sizeof(t),true);
            for i:=m downto 1 do
            begin
                if t[a[i]]=true then
                begin
                    write(a[i],' ');
                    t[a[i]]:=false;
                end;
            end;
            for i:=1 to n do if t[i] then write(i,' ');
            readln;
        End.