import java.io.*; import java.util.*; public class Main { public static void main(String[] args) throws Exception { Scanner sc = new Scanner(); String s = sc.next(); long n = sc.nextLong(); for (int i = 0; i < Math.min(10, n); i++) { s = change(s); } n = Math.max(0, n - 10); n %= 26; for (int i = 0; i < n; i++) { s = change(s); } System.out.println(s); } static String change(String s) { StringBuilder ans = new StringBuilder(); for (char c : s.toCharArray()) { if (c >= 'a' && c <= 'z') { ans.append((char)((c - 'a' + 1) % 26 + 'a')); } else if (c >= 'A' && c <= 'Z') { ans.append((char)((c - 'A' + 1) % 26 + 'A')); } else if (c == '9') { ans.append("CpCzNkSuTbEoA"); } else { ans.append((char)(c + 1)); } } return ans.toString(); } } class Scanner { BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); StringTokenizer st = new StringTokenizer(""); public Scanner() throws Exception { } public int nextInt() throws Exception { return Integer.parseInt(next()); } public long nextLong() throws Exception { return Long.parseLong(next()); } public String next() throws Exception { if (!st.hasMoreTokens()) { st = new StringTokenizer(br.readLine()); } return st.nextToken(); } }