print("\n".join([bin(ord(c)-96)[2:].rjust(5, '0') for c in a.replace(' ', chr(96))] + ['1'*5]))