S = input() N = int(input()) ans = list(S) flag = True while flag: flag = False for i in range(len(ans)): if "a"<=ans[i]<="z": ans[i] = chr( (ord(ans[i])-ord('a')+1)%26 + ord('a') ) elif "A"<=ans[i]<="Z": ans[i] = chr( (ord(ans[i])-ord('A')+1)%26 + ord('A') ) elif "0"<=ans[i]<="8": ans[i] = str(int(ans[i]) + 1) else: ans[i] = "CpCzNkSuTbEoA" if "0"<=ans[i]<="9": flag = True ans = list("".join(ans)) N -= 1 for i in range(len(ans)): if "a"<=ans[i]<="z": ans[i] = chr( (ord(ans[i])-ord('a')+N)%26 + ord('a') ) elif "A"<=ans[i]<="Z": ans[i] = chr( (ord(ans[i])-ord('A')+N)%26 + ord('A') ) print("".join(ans))