import Foundation

let str = readLine()
let indexToChange = readLine()

let strString = String(UTF8String: str!)!
let indexToChangeInt = Int(indexToChange!)!

var moneChar = 1
var charToChange = ""
for i in strString.characters {
    if moneChar == indexToChangeInt {
        charToChange = String(i)
        //print(charToChange)
    }
    moneChar++
}


var found = false
var finalString = ""
for char in "abcdefghijklmnopqrstuvwxyz".characters {
    if found == true &&  charToChange != "z"{
        // -----------------------
        var moneC = 1
        for c in strString.characters {
            if moneC == indexToChangeInt {
                finalString.append(char)
            } else {
                finalString.append(c)
            }
            moneC++
        }
        break
        
        // -----------------------
        
    } else {
        if String(char) == charToChange {
            if charToChange != "z" {
                found = true
            } else {
                var moneC = 1
                finalString = ""
                for c in strString.characters {
                    if moneC == indexToChangeInt {
                        finalString.append(Character("a"))
                    } else {
                        finalString.append(c)
                    }
                    moneC++
                }
            }
        }
    }
}


print(String(finalString))