s=eval(input())

k=int(eval(input()))

t="abcdefghijklmnopqrstuvwxyz"

a=[t.index(i)for i in s]

i=0

while k:

  if i==len(s)-1:a[i]+=k;a[i]%=26;k=0

  if a[i]==0 or 26-a[i]>k:i+=1

  else:a[i]+=1;a[i]%=26;k-=1

print(("".join([t[i]for i in a])))
t="abcdefghijklmnopqrstuvwxyz"

s=eval(input())

k=int(eval(input()))

a=[t.index(i)for i in s]

ans=""

for i in a:

  j=i

  if i==0:

    ans+="a"

    continue

  if k>=26-i:

    k-=26-i

    j=0

  ans+=t[j]

j+=k

j%=26

ans=ans[:-1]+t[j]

print(ans)
s = eval(input())
k = int(eval(input()))
t = "abcdefghijklmnopqrstuvwxyz"
a = [t.index(i) for i in s]
i = 0
while k:
    if i == len(s) - 1:
        a[i] += k
        a[i] %= 26
        k = 0
    if a[i] == 0 or 26 - a[i] > k:
        i += 1
    else:
        a[i] += 1
        a[i] %= 26
        k -= 1
print(("".join([t[i] for i in a])))

t = "abcdefghijklmnopqrstuvwxyz"
s = eval(input())
k = int(eval(input()))
a = [t.index(i) for i in s]
ans = ""
for i in a:
    j = i
    if i == 0:
        ans += "a"
        continue
    if k >= 26 - i:
        k -= 26 - i
        j = 0
    ans += t[j]
j += k
j %= 26
ans = ans[:-1] + t[j]
print(ans)

+t = "abcdefghijklmnopqrstuvwxyz" -t = "abcdefghijklmnopqrstuvwxyz" -i = 0 -while k: -    if i == len(s) - 1: -        a[i] += k -        a[i] %= 26 -        k = 0 -    if a[i] == 0 or 26 - a[i] > k: -        i += 1 -    else: -        a[i] += 1 -        a[i] %= 26 -        k -= 1 -print(("".join([t[i] for i in a]))) +ans = "" +for i in a: +    j = i +    if i == 0: +        ans += "a" +        continue +    if k >= 26 - i: +        k -= 26 - i +        j = 0 +    ans += t[j] +j += k +j %= 26 +ans = ans[:-1] + t[j] +print(ans)