local ffi = require("ffi") local C = ffi.C ffi.cdef[[ long long atoll(const char*); ]] local function lltonumber(str) return C.atoll(str) end local s = io.read() local n = io.read() n = lltonumber(n) local t = {} local function f() for i = 1, #s do local ss = s:byte(i) if 48 <= ss and ss <= 56 then t[i] = string.char(ss + 1) elseif ss == 57 then t[i] = "CpCzNkSuTbEoA" elseif 65 <= ss and ss <= 89 then t[i] = string.char(ss + 1) elseif ss == 90 then t[i] = "A" elseif 97 <= ss and ss <= 121 then t[i] = string.char(ss + 1) elseif ss == 122 then t[i] = "a" end end s = table.concat(t) end if n <= 10LL then while 0LL < n do f() n = n - 1LL end else for i = 1, 10 do f() end n = (n - 10LL) % 26LL while 0LL < n do f() n = n - 1 end end print(s)