def censor(text, word):
    text = list(text.split())
    censored_text = ""
    for i in text:
        if i == word:
            c  = len(word) * "*"
            text.insert(text.index(i), c)
            text.remove(word)
	return " ".join(text)
print censor("pidoras idet kudato pidoras pidoras", "pidoras")