package main import . "fmt" func main() { var s string var n int64 Scan(&s,&n) f(s,n) Println() } func f(s string, n int64) { for _, c := range s { switch { case '0' <= c && c <= '8': if n == 0 { Print(string(c)) } else { f(string(c+1), n-1) } case c == '9': if n==0 { Print("9") } else { f("CpCzNkSuTbEoA",n-1) } case 'A' <= c && c <= 'Z': Print(string((int(c-'A')+int(n % 26))%26+'A')) case 'a' <= c && c <= 'z': Print(string((int(c-'a')+int(n % 26))%26+'a')) } } }