<reponame>kagemeka/atcoder-submissions<filename>jp.atcoder/abc059/abc059_a/8223529.py
strings = input().split()

acronym = ""
for s in strings:
    acronym += s[0].upper()

print(acronym)

strings = input().split()

acronym = ""
for s in strings:
    acronym += s[0].upper()

print(acronym)