#t192. 单词替换
单词替换
Word Replacement
Problem Description
Read a string ending with a newline (length ). The string consists of several words separated by single spaces; all words are case-sensitive. Now replace one of the words with another word and output the resulting string.
Input Format
The input consists of lines:
- The first line is the string containing multiple words;
- The second line is the word to be replaced (length );
- The third line is the word that will be replaced with (length ).
Neither , , nor has any leading or trailing spaces.
Output Format
Output a single line: the string after replacing every occurrence of word in with word .
Sample Input
You want someone to help you
You
I
Sample Output
I want someone to help you