Problem:
Score : 400 points

Problem Statement

Mr. Takahashi has a string s consisting of lowercase English letters.
He repeats the following operation on s exactly K times.

Choose an arbitrary letter on s and change that letter to the next alphabet. Note that the next letter of z is a.

For example, if you perform an operation for the second letter on aaz, aaz becomes abz.
If you then perform an operation for the third letter on abz, abz becomes aba.

Mr. Takahashi wants to have the lexicographically smallest string after performing exactly K operations on s.
Find the such string.

Constraints

1≤|s|≤10^5

All letters in s are lowercase English letters.

1≤K≤10^9

Input

The input is given from Standard Input in the following format:

s
K

Output

Print the lexicographically smallest string after performing exactly K operations on s.

Sample Input 1

xyz
4

Sample Output 1

aya

For example, you can perform the following operations: xyz, yyz, zyz, ayz, aya.

Sample Input 2

a
25

Sample Output 2

z

You have to perform exactly K operations.

Sample Input 3

codefestival
100

Sample Output 3

aaaafeaaivap

Solution in Fortran (gfortran v4.8.4) (judge verdict: Accepted)

program main
	implicit none
	character(100010) :: s
	integer :: K, i
	
	read(*, *) s
	read(*, *) K
	
	do i = 1, len_trim(s)
		if(K-search(s(i:i)) >= 0) then
			K = K - search(s(i:i))
			s(i:i) ="a"
		end if
	end do
	s(len_trim(s):len_trim(s)) = search_out(mod((26-(search(s(len_trim(s):len_trim(s)))-mod(K,26))),26))
	
	write(*, *) trim(s)
	
	contains
	integer function search(moji)
		character(1) :: moji
		if(moji == "a")  search = 0
		if(moji == "b")  search = 25
		if(moji == "c")  search = 24
		if(moji == "d")  search = 23
		if(moji == "e")  search = 22
		if(moji == "f")  search = 21
		if(moji == "g")  search = 20
		if(moji == "h")  search = 19
		if(moji == "i")  search = 18
		if(moji == "j")  search = 17
		if(moji == "k")  search = 16
		if(moji == "l")  search = 15
		if(moji == "m")  search = 14
		if(moji == "n")  search = 13
		if(moji == "o")  search = 12
		if(moji == "p")  search = 11
		if(moji == "q")  search = 10
		if(moji == "r")  search = 9
		if(moji == "s")  search = 8
		if(moji == "t")  search = 7
		if(moji == "u")  search = 6
		if(moji == "v")  search = 5
		if(moji == "w")  search = 4
		if(moji == "x")  search = 3
		if(moji == "y")  search = 2
		if(moji == "z")  search = 1
	end function search
	
	character(1) function search_out(kazu)
		integer :: kazu
		if(kazu == 0)  search_out = "a"
		if(kazu == 1)  search_out = "b"
		if(kazu == 2)  search_out = "c"
		if(kazu == 3)  search_out = "d"
		if(kazu == 4)  search_out = "e"
		if(kazu == 5)  search_out = "f"
		if(kazu == 6)  search_out = "g"
		if(kazu == 7)  search_out = "h"
		if(kazu == 8)  search_out = "i"
		if(kazu == 9)  search_out = "j"
		if(kazu == 10)  search_out = "k"
		if(kazu == 11)  search_out = "l"
		if(kazu == 12)  search_out = "m"
		if(kazu == 13)  search_out = "n"
		if(kazu == 14)  search_out = "o"
		if(kazu == 15)  search_out = "p"
		if(kazu == 16)  search_out = "q"
		if(kazu == 17)  search_out = "r"
		if(kazu == 18)  search_out = "s"
		if(kazu == 19)  search_out = "t"
		if(kazu == 20)  search_out = "u"
		if(kazu == 21)  search_out = "v"
		if(kazu == 22)  search_out = "w"
		if(kazu == 23)  search_out = "x"
		if(kazu == 24)  search_out = "y"
		if(kazu == 25)  search_out = "z"
	end function search_out
end program main