#include<bits/stdc++.h>
using namespace std;
using ll = long long;

int main(){
    string s;
    ll N;
    cin >> s >> N;
    auto update = [&](string s, ll d){
        string t;
        for(int i = 0; i < s.size(); i++){
            if(s[i] >= 'a' && s[i] <= 'z'){
                t += (s[i] - 'a' + d) % 26 + 'a';
            }
            if(s[i] >= 'A' && s[i] <= 'Z'){
                t += (s[i] - 'A' + d) % 26 + 'A';
            }
            if(s[i] >= '0' && s[i] <= '8'){
                t+= (char)(s[i] + 1);
            }
            if(d == 1 && s[i] == '9'){
                t += "CpCzNkSuTbEoA";
            }
        }
        return t;
    };
    int cnt = 10;
    while(N && cnt){
        N--, cnt--;
        s = update(s, 1);
    }
    if(N >= 1)s = update(s, N);
    cout << s << endl;
}