s = input().split()

print(''.join([w[0] for w in s]).upper())

print(''.join([w[0] for w in input().split()]).upper())
s = input().split()
print("".join([w[0] for w in s]).upper())

print("".join([w[0] for w in input().split()]).upper())

-s = input().split() -print("".join([w[0] for w in s]).upper()) +print("".join([w[0] for w in input().split()]).upper())