def mutate_string(string, position, character):
    ##alternate method
    #string_list = list(string)
    #string_list[position] = character
    #new_string = ''.join(string_list)
    #return new_string
    
    new_string = string[:position] + character + string[position+1:]
    return new_string

if __name__ == '__main__':
    s = raw_input()
    i, c = raw_input().split()
    s_new = mutate_string(s, int(i), c)
    print s_new