a = eval(input())

print(('A' if not a.islower() else 'a'))

print(('A' if input().isupper() else 'a'))

a = eval(input())
print(("A" if not a.islower() else "a"))

print(("A" if input().isupper() else "a"))

-a = eval(input()) -print(("A" if not a.islower() else "a")) +print(("A" if input().isupper() else "a"))