#include using namespace std; typedef long long ll; int main(){ string s; cin >> s; ll n; cin >> n; for(int i = 0;i < 9;i++){ if(i >= n)break; string t; for(int j = 0;j < s.size();j++){ if(s[j] >= 'A' && s[j] <= 'Z')t += (char)('A' + ((s[j] - 'A') + 1) % 26); else if(s[j] >= 'a' && s[j] <= 'z')t += (char)('a' + ((s[j] - 'a') + 1) % 26); else if(s[j] != '9')t += (char)('0' + ((s[j] - '0') + 1)); else t += "CpCzNkSuTbEoA"; } s = t; } if(n <= 9){ cout << s << endl; return 0; } n -= 9; n %= 26; string t; for(int j = 0;j < s.size();j++){ if(s[j] >= 'A' && s[j] <= 'Z')t += (char)('A' + ((s[j] - 'A') + n) % 26); else if(s[j] >= 'a' && s[j] <= 'z')t += (char)('a' + ((s[j] - 'a') + n) % 26); } cout << t << endl; }