import sys readline=sys.stdin.readline write=sys.stdout.write S=list(readline().rstrip()) N=int(readline()) if N>=100: N-=100 N%=26 N+=100 for _ in range(N): prev=S S=[] for s in prev: if s=="z": S.append("a") elif s=="Z": S.append("A") elif s=="9": S+=list("CpCzNkSuTbEoA") else: S.append(chr(ord(s)+1)) print(*S,sep="")