import sys
s = sys.stdin.readline()
while len(s) > 0:
    t = []
    for c in s.split():
        t.append(c[0:-1] + c[-1].upper())
    print(' '.join(t))
    s = sys.stdin.readline()

fae3cc28f21ef811532cbece5d22adac572795b4
<mask token>

<mask token>
while len(s) > 0:
    t = []
    for c in s.split():
        t.append(c[0:-1] + c[-1].upper())
    print(' '.join(t))
    s = sys.stdin.readline()

<mask token>
s = sys.stdin.readline()
while len(s) > 0:
    t = []
    for c in s.split():
        t.append(c[0:-1] + c[-1].upper())
    print(' '.join(t))
    s = sys.stdin.readline()

import sys
s = sys.stdin.readline()
while len(s) > 0:
    t = []
    for c in s.split():
        t.append(c[0:-1] + c[-1].upper())
    print(' '.join(t))
    s = sys.stdin.readline()
