Skip to main content
Tuesday (24.11.2026) at 20:00: ALGOR Contest: Round #4 (Special Challenge) starts!

~/algor $ cat problems/string-harfni-almashtirish

Replace a letter

Easy 1000 ms 128 MB 26%
Share

A string $s$ of lowercase Latin letters and letters $a$ and $b$ are given. Replace every letter $a$ in the string with the letter $b$.

Replacing the given letters of the string with a new letter

Input

The first line contains the string $s$. The second line contains two letters $a$ and $b$ separated by a space.

Output

The resulting string on one line.

Note

$1 \le |s| \le 10^{5}$
$s$ consists of lowercase Latin letters (a–z) only
$a$, $b$ are lowercase Latin letters ($a = b$ is possible)

Examples

Input #1
kitob
o a
Output #1
kitab
Input #2
abc
x y
Output #2
abc

Sign in to submit a solution

Signing up is free and takes a minute.