
var fi: file of byte;
    fo: text;
    b: byte;

function dec2hex(b:byte):string;
const nib2hex:array[0..$F] of char = 
('0','1','2','3','4','5','6','7','8','9','A','B','C','D','E','F');
begin
  dec2hex:=nib2hex[b shr 4]+nib2hex[b and $F];
end;

begin {main}
  assign(fi,paramstr(1));
  assign(fo,paramstr(2));
  reset(fi);
  rewrite(fo);
  while not eof(fi) do begin
    read(fi,b);
    write(fo,dec2hex(b),' ');
  end;
  close(fi);
  close(fo);
end.