for i,c in ipairs{io.read("*a"):byte(1,-1)}do k=0 for j=0,7 do k=k*2;k=k+c%2;c=math.floor(c/2)end io.write(string.char(k))end