var n,r,x:longint;
procedure d2r(x,r:longint x);
begin
if x>=r then d2r(x/r,r);
if x mod r<10 then write(x mod r) else write(chr(x mod r + 55);
end;
begin
readln(x);
write(x,'=('); d2r(x,2); writeln(')2');
write(x,'=('); d2r(x,8); writeln(')8');
write(x,'=('); d2r(x,16); writeln(')16');
end.