def henkan(c): if "a" <= c < "z" or "A" <= c < "Z" or "0" <= c < "9": return chr(ord(c) + 1) if c == "z": return "a" if c == "Z": return "A" if c == "9": return "CpCzNkSuTbEoA" assert False S = input() n = int(input()) if n >= 36: n = 10 + (n - 10) % 26 for _ in range(n): S = "".join(map(henkan, S)) print(S)