#C13926. Replace Substrings
Replace Substrings
Replace Substrings
Given a string (s), your task is to replace every occurrence of the substring (abc) with (xyz). In case of overlapping occurrences, each valid instance should be replaced independently.
For example:
- If \(s = \"abc\"\), then the output should be \(\"xyz\"\).
- If \(s = \"defabcghi\"\), then the output should be \(\"defxyzghi\"\).
You must read the input from standard input (stdin) and print the result to standard output (stdout).
inputFormat
Input is provided on a single line containing the string (s). The string can contain any printable characters.
outputFormat
Output a single line representing the new string after all occurrences of (abc) have been replaced by (xyz).## sample
abc
xyz