def censor(text, word):
    text = text.split()
    censored_text = ''
    number = len(word)
    for i in text:
        print i
        if i == word:
            "*".join(censored_text) * number
        else:
            i.join(censored_text)
    return censored_text
print censor("pidar Illya poshel nahui", "nahui")