Name for a Python
Pythons are quite selective when it comes to naming their offspring. Initially, each python mother creates a name using a sequence of lowercase Latin letters, following a unique python tradition. However, these names often end up being difficult to pronounce. To address this, any letters in the sequence that are hard to pronounce should be replaced with the pythons' favorite letter A
. Yet, there's a catch: an ancient python law forbids changing the letters at certain positions C[i]
(with positions traditionally numbered starting from zero).
Input
The first line contains the word S (1 ≤ len(S) ≤ 100)
, crafted by the python's mother, consisting of lowercase Latin letters. The second line specifies the letters B[i] (1 ≤ i ≤ 25)
, which are challenging for pythons to pronounce. The third line provides the positions C[i] (0 ≤ C[i] < len(S)
, 0 ≤ i ≤ len(S) ≤ 100)
, where changes are prohibited by ancient law. The last line contains the pythons' favorite letter A
(A ≠ B[i]
for any i
).
Output
Print a single line – the final python name.