ch = eval(input())

print(('A' if 65<=ord(ch)<=91 else 'a'))

print(('A' if 65<=ord(eval(input()))<=91 else 'a'))

ch = eval(input())
print(("A" if 65 <= ord(ch) <= 91 else "a"))

print(("A" if 65 <= ord(eval(input())) <= 91 else "a"))

-ch = eval(input()) -print(("A" if 65 <= ord(ch) <= 91 else "a")) +print(("A" if 65 <= ord(eval(input())) <= 91 else "a"))