s = eval(input())

s += " "

K = int(eval(input()))

alphabet = ["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"]

k = 0



k = K

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

	gap = (26 - alphabet.index(s[i])) % 26

	if K >= gap:

		K -= gap

		s = s[:i] + "a" + s[i+1:]

s = s[:-1]



if K:

	n = alphabet.index(s[-1])

	n += K

	n %= 26

	s = s[:-1] + alphabet[n]



print(s)
S = eval(input())

K = int(eval(input()))

ans = ""

for i in range(len(S)):

    if(S[i] != 'a' and K >= (ord('a') - ord(S[i]))%26):

        ans += 'a'

        K -= (ord('a') - ord(S[i]))%26

    else:

        ans += S[i]



K %= 26

ans = ans[:-1] + chr(ord('a') + (ord(ans[-1])-ord('a') + K)%26)

print(ans)

s = eval(input())
s += " "
K = int(eval(input()))
alphabet = [
    "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",
]
k = 0
k = K
for i in range(len(s) - 1):
    gap = (26 - alphabet.index(s[i])) % 26
    if K >= gap:
        K -= gap
        s = s[:i] + "a" + s[i + 1 :]
s = s[:-1]
if K:
    n = alphabet.index(s[-1])
    n += K
    n %= 26
    s = s[:-1] + alphabet[n]
print(s)

S = eval(input())
K = int(eval(input()))
ans = ""
for i in range(len(S)):
    if S[i] != "a" and K >= (ord("a") - ord(S[i])) % 26:
        ans += "a"
        K -= (ord("a") - ord(S[i])) % 26
    else:
        ans += S[i]
K %= 26
ans = ans[:-1] + chr(ord("a") + (ord(ans[-1]) - ord("a") + K) % 26)
print(ans)

-s = eval(input()) -s += " " +S = eval(input()) -alphabet = [ -    "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", -] -k = 0 -k = K -for i in range(len(s) - 1): -    gap = (26 - alphabet.index(s[i])) % 26 -    if K >= gap: -        K -= gap -        s = s[:i] + "a" + s[i + 1 :] -s = s[:-1] -if K: -    n = alphabet.index(s[-1]) -    n += K -    n %= 26 -    s = s[:-1] + alphabet[n] -print(s) +ans = "" +for i in range(len(S)): +    if S[i] != "a" and K >= (ord("a") - ord(S[i])) % 26: +        ans += "a" +        K -= (ord("a") - ord(S[i])) % 26 +    else: +        ans += S[i] +K %= 26 +ans = ans[:-1] + chr(ord("a") + (ord(ans[-1]) - ord("a") + K) % 26) +print(ans)