def succ(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(succ, s)) print(s)