using System;
class Program
{
public static string removeWord(string str, string word) {
if (str.Contains(word)) {
string tmp = word + " ";
str = str.Replace(tmp, "");
tmp = " " + word;
str = str.Replace(tmp, "");
}
return str;
}
static void Main() {
string str = "c# java c c++ python rust go";
string word = "rust";
str = removeWord(str, word);
Console.Write(str);
}
}
/*
run:
c# java c c++ python go
*/