The first line of the input is a string (between 1 and 50 characters long, inclusive). Each character will be a letter of English alphabet, lowercase or uppercase.

The second line of the input is an integer between 0 and 26, inclusive.
a=list(input().lower())
b=int(input())
c=['a','b','c','d','e','f','g','h','i','j','k','l','m','n','o','p','q','r','s','t','u','v','w','x','y','z'][:b]
f=len(a)
for i in range(f):
    if a[i] in c:
        a[i]=a[i].upper()
s=' '
for i in a:
    s+=i
print(s[1:])