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.
s=input();s=s.lower();s=(' '.join(s)).split();n=int(input())
for i in range(0,len(s)):
    if n+96>ord(s[i]):
        s[i]=chr(ord(s[i])-32)
for j in range(0,len(s)):
    print(s[j],end='')