s=eval(input())

k=int(eval(input()))

a=[]

for t in s[:-1]:

  c=123-ord(t)

  if k<c or t=='a':

    a.append(t)

  else:

    k-=c

    a.append('a')

a.append(chr((ord(s[-1])-97+k)%26+97))

print((''.join(a)))
s,k=open(0)

k=int(k)

*l,=map(ord,s[:-1])

for i,t in enumerate(l):

  j=(19-t)%26

  if j<=k:k-=j;l[i]=97

l[-1]+=k%26

print(*map(chr,l),sep='')

s = eval(input())
k = int(eval(input()))
a = []
for t in s[:-1]:
    c = 123 - ord(t)
    if k < c or t == "a":
        a.append(t)
    else:
        k -= c
        a.append("a")
a.append(chr((ord(s[-1]) - 97 + k) % 26 + 97))
print(("".join(a)))

s, k = open(0)
k = int(k)
(*l,) = map(ord, s[:-1])
for i, t in enumerate(l):
    j = (19 - t) % 26
    if j <= k:
        k -= j
        l[i] = 97
l[-1] += k % 26
print(*map(chr, l), sep="")

-s = eval(input()) -k = int(eval(input())) -a = [] -for t in s[:-1]: -    c = 123 - ord(t) -    if k < c or t == "a": -        a.append(t) -    else: -        k -= c -        a.append("a") -a.append(chr((ord(s[-1]) - 97 + k) % 26 + 97)) -print(("".join(a))) +s, k = open(0) +k = int(k) +(*l,) = map(ord, s[:-1]) +for i, t in enumerate(l): +    j = (19 - t) % 26 +    if j <= k: +        k -= j +        l[i] = 97 +l[-1] += k % 26 +print(*map(chr, l), sep="")