a=eval(input())

print(("A" if a.lower()!=a else "a"))
s=eval(input())

print(("A" if s.upper()==s else "a"))
a = eval(input())
print(("A" if a.lower() != a else "a"))

s = eval(input())
print(("A" if s.upper() == s else "a"))

-a = eval(input()) -print(("A" if a.lower() != a else "a")) +s = eval(input()) +print(("A" if s.upper() == s else "a"))