# official link: https://github.com/nailyav/ssad/edit/main/program/main.py

s = input()[::-1].lower()

alph = ['a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o', 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z']

for letter in s:
    print(str(alph.index(letter) + 1), end=' ', flush=True)

02b195ecf50754ea486e0480851b330a6037b7b0
<mask token>

<mask token>
for letter in s:
    print(str(alph.index(letter) + 1), end=' ', flush=True)

s = input()[::-1].lower()
alph = ['a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm',
    'n', 'o', 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z']
for letter in s:
    print(str(alph.index(letter) + 1), end=' ', flush=True)

# official link: https://github.com/nailyav/ssad/edit/main/program/main.py

s = input()[::-1].lower()

alph = ['a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o', 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z']

for letter in s:
    print(str(alph.index(letter) + 1), end=' ', flush=True)
