s1,s2,s3 = input().split()

ans = s1[:1]+s2[:1]+s3[:1]

print((ans.upper()))

a,b,c = list(map(str,input().split()))

print(((a[0]+b[0]+c[0]).upper()))

s1, s2, s3 = input().split()
ans = s1[:1] + s2[:1] + s3[:1]
print((ans.upper()))

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

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