import string



S = list(input())

K = int(input())



alpha = string.ascii_lowercase

s = len(S)



for i in range(s):

    num = (26 - alpha.index(S[i])) % 26

    if num <= K:

        K -= num

        S[i] = 'a'

    else:

        pass



if K > 0:

    num = (alpha.index(S[-1]) + K) % 26

    S[-1] = alpha[num]

else:

    pass



print(*S, sep='')

import string



s = eval(input())

K = int(eval(input()))



alp = string.ascii_lowercase

ans = ''



for i in range(len(s)-1):

    num = (len(alp) - alp.index(s[i])) % 26

    if num <= K:

        K -= num

        ans += 'a'

    else:

        ans += s[i]



if K > 0:

    num = (alp.index(s[-1]) + K) % 26

    ans += alp[num]

else:

    ans += s[-1]



print(ans)
import string

S = list(input())
K = int(input())
alpha = string.ascii_lowercase
s = len(S)
for i in range(s):
    num = (26 - alpha.index(S[i])) % 26
    if num <= K:
        K -= num
        S[i] = "a"
    else:
        pass
if K > 0:
    num = (alpha.index(S[-1]) + K) % 26
    S[-1] = alpha[num]
else:
    pass
print(*S, sep="")

import string

s = eval(input())
K = int(eval(input()))
alp = string.ascii_lowercase
ans = ""
for i in range(len(s) - 1):
    num = (len(alp) - alp.index(s[i])) % 26
    if num <= K:
        K -= num
        ans += "a"
    else:
        ans += s[i]
if K > 0:
    num = (alp.index(s[-1]) + K) % 26
    ans += alp[num]
else:
    ans += s[-1]
print(ans)

-S = list(input()) -K = int(input()) -alpha = string.ascii_lowercase -s = len(S) -for i in range(s): -    num = (26 - alpha.index(S[i])) % 26 +s = eval(input()) +K = int(eval(input())) +alp = string.ascii_lowercase +ans = "" +for i in range(len(s) - 1): +    num = (len(alp) - alp.index(s[i])) % 26 -        S[i] = "a" +        ans += "a" -        pass +        ans += s[i] -    num = (alpha.index(S[-1]) + K) % 26 -    S[-1] = alpha[num] +    num = (alp.index(s[-1]) + K) % 26 +    ans += alp[num] -    pass -print(*S, sep="") +    ans += s[-1] +print(ans)