var c:char;j:comp;begin repeat read(c);if c=^`then writeln else for j:=-3to 0do write((ord(c)+3)shr(-j)and 1)until 1=0end.