var
x:longint;
z:array[1..100] of byte;
top:byte;
y,modd:byte;
procedure push;
begin
inc(top); z[top]:=modd;
end;
procedure pop;
begin
if top>0 then begin y:=z[top]; dec(top); end
else writeln('stack overflow !');
end;
begin
x:=1234567890;
top:=0;
repeat
modd:=x mod 16;
x:=x div 16;
push;
until x=0;
while top>0 do begin
pop;
if (y>=10) then write(chr(y-10+ord('A')):1)
else write(chr(y+ord('0')):1);
end;
end.