s1,s2,s3 = list(map(str,input().split()))



s = s1[0] + s2[0] + s3[0]



s = s.upper()



print(s)
a,b,c = input().split()

print(((a[0]+b[0]+c[0]).upper()))
s1, s2, s3 = list(map(str, input().split()))
s = s1[0] + s2[0] + s3[0]
s = s.upper()
print(s)

a, b, c = input().split()
print(((a[0] + b[0] + c[0]).upper()))

-s1, s2, s3 = list(map(str, input().split())) -s = s1[0] + s2[0] + s3[0] -s = s.upper() -print(s) +a, b, c = input().split() +print(((a[0] + b[0] + c[0]).upper()))