#const alph_lower="abcdefghijklmnopqrstuvwxyz" alph_upper="ABCDEFGHIJKLMNOPQRSTUVWXYZ" #process S=input() N=int(input()) #数字をなくすために最大10回ずらす for i in range(10): if N==0:break S=S.translate(str.maketrans(dict(zip(alph_lower,alph_lower[1:]+"a")))) S=S.translate(str.maketrans(dict(zip(alph_upper,alph_upper[1:]+"A")))) S=S.translate(str.maketrans(dict(zip(["0","1","2","3","4","5","6","7","8","9"],["1","2","3","4","5","6","7","8","9","CpCzNkSuTbEoA"])))) N-=1 for i in range(N%26): S=S.translate(str.maketrans(dict(zip(alph_lower,alph_lower[1:]+"a")))) S=S.translate(str.maketrans(dict(zip(alph_upper,alph_upper[1:]+"A")))) S=S.translate(str.maketrans(dict(zip(["0","1","2","3","4","5","6","7","8","9"],["1","2","3","4","5","6","7","8","9","CpCzNkSuTbEoA"])))) print(S)