Problem list
Log in
#r03080 · Online Judge > GoldOJ

Replace a Character

Bronze III 2.0 s 1024 MB

A lowercase string $S$ and two single characters $A$, $B$ are given (one per line). Print $S$ with every occurrence of $A$ replaced by $B$.

Input

Line 1: $S$ (lowercase, length 1 to 100). Line 2: $A$. Line 3: $B$.

Output

Print $S$ after replacing all $A$ with $B$.

Example 1

Input
banana
a
o
Output
bonono
Source
Online Judge > GoldOJ
Appears in
Not part of a ladder, contest or set yet.
Accepted 0 Submissions 0 Acceptance 0% Solvers 0

Discussion

Threads about this problem. Spoilers are collapsed; wrap hints in ||double bars||.

No discussion yet. Start a thread if something here needs explaining.

Recent submissions Open with filters
Code