/* package whatever; // don't place package name! */
import java.util.*;
import java.lang.*;
import java.io.*;
/* Name of the class has to be "Main" only if the class is public. */
class Ideone
{
{
System.
out.
println(replace
(reader.
readLine(), reader.
readLine(), reader.
readLine())); }
StringBuilder builder = new StringBuilder(source);
int idx;
while ((idx = builder.indexOf(from)) != -1) {
builder.replace(idx, idx+from.length(), to);
}
return builder.toString();
}
}
LyogcGFja2FnZSB3aGF0ZXZlcjsgLy8gZG9uJ3QgcGxhY2UgcGFja2FnZSBuYW1lISAqLwoKaW1wb3J0IGphdmEudXRpbC4qOwppbXBvcnQgamF2YS5sYW5nLio7CmltcG9ydCBqYXZhLmlvLio7CgovKiBOYW1lIG9mIHRoZSBjbGFzcyBoYXMgdG8gYmUgIk1haW4iIG9ubHkgaWYgdGhlIGNsYXNzIGlzIHB1YmxpYy4gKi8KY2xhc3MgSWRlb25lCnsKCXB1YmxpYyBzdGF0aWMgdm9pZCBtYWluIChTdHJpbmdbXSBhcmdzKSB0aHJvd3MgamF2YS5sYW5nLkV4Y2VwdGlvbgoJewoJCUJ1ZmZlcmVkUmVhZGVyIHJlYWRlciA9IG5ldyBCdWZmZXJlZFJlYWRlcihuZXcgSW5wdXRTdHJlYW1SZWFkZXIoU3lzdGVtLmluKSk7CgkJU3lzdGVtLm91dC5wcmludGxuKHJlcGxhY2UocmVhZGVyLnJlYWRMaW5lKCksIHJlYWRlci5yZWFkTGluZSgpLCByZWFkZXIucmVhZExpbmUoKSkpOwoJfQoJCglzdGF0aWMgU3RyaW5nIHJlcGxhY2UoU3RyaW5nIHNvdXJjZSwgU3RyaW5nIGZyb20sIFN0cmluZyB0bykgewogICAgICAgIFN0cmluZ0J1aWxkZXIgYnVpbGRlciA9IG5ldyBTdHJpbmdCdWlsZGVyKHNvdXJjZSk7CiAgICAgICAgaW50IGlkeDsKICAgICAgICB3aGlsZSAoKGlkeCA9IGJ1aWxkZXIuaW5kZXhPZihmcm9tKSkgIT0gLTEpIHsKICAgICAgICAgICAgYnVpbGRlci5yZXBsYWNlKGlkeCwgaWR4K2Zyb20ubGVuZ3RoKCksIHRvKTsKICAgICAgICB9CiAgICAgICAgcmV0dXJuIGJ1aWxkZXIudG9TdHJpbmcoKTsKICAgIH0KfQ==