for i in input():
    if i.islower():
        print(i.upper(), end='')
    else:
        print(i.lower(), end='')

for i in input():
    if i.islower():
        print(i.upper(), end='')
    else:
        print(i.lower(), end='')
