#include using namespace std; #ifdef LOCAL #include "settings/debug.cpp" #else #define Debug(...) void(0) #endif #define rep(i, n) for (int i = 0; i < (n); ++i) using ll = long long; using ull = unsigned long long; int main() { string s; ll n; cin >> s >> n; auto op = [&]() { string t = ""; for (char c : s) { if (islower(c)) { t += c + 1; if (t.back() > 'z') t.back() = 'a'; } else if (isupper(c)) { t += c + 1; if (t.back() > 'Z') t.back() = 'A'; } else if (isdigit(c)) { t += c + 1; if (t.back() > '9') { t.pop_back(); t += "CpCzNkSuTbEoA"; } } else { assert(false); } } swap(s, t); }; rep(_, min(n, 20LL)) op(); n = max(n - 20, 0LL); if (n != 0) for (char c : s) assert(islower(c) || isupper(c)); n %= 26; rep(_, n) op(); cout << s << endl; return 0; }