import java.util.*;
import java.lang.*;
import java.io.*;
import java.util.regex.*;
/* Name of the class has to be "Main" only if the class is public. */
class Ideone
{
{
String text
= "plan plans lander planitia"; String pattern
= "\\w*(lan)\\w+"; Pattern r = Pattern.compile(pattern);
Matcher m = r.matcher(text);
while (m.find()) {
m.appendReplacement(sb, m.group(0).replaceFirst(Pattern.quote(m.group(1)), "<--->"));
}
m.appendTail(sb); // append the rest of the contents
System.
out.
println(sb.
toString()); }
}
aW1wb3J0IGphdmEudXRpbC4qOwppbXBvcnQgamF2YS5sYW5nLio7CmltcG9ydCBqYXZhLmlvLio7CmltcG9ydCBqYXZhLnV0aWwucmVnZXguKjsKLyogTmFtZSBvZiB0aGUgY2xhc3MgaGFzIHRvIGJlICJNYWluIiBvbmx5IGlmIHRoZSBjbGFzcyBpcyBwdWJsaWMuICovCmNsYXNzIElkZW9uZQp7CglwdWJsaWMgc3RhdGljIHZvaWQgbWFpbiAoU3RyaW5nW10gYXJncykgdGhyb3dzIGphdmEubGFuZy5FeGNlcHRpb24KCXsKCQlTdHJpbmcgdGV4dCA9ICJwbGFuIHBsYW5zIGxhbmRlciBwbGFuaXRpYSI7CiAgICAgICAgU3RyaW5nIHBhdHRlcm4gPSAiXFx3KihsYW4pXFx3KyI7CiAgICAgICAgUGF0dGVybiByID0gUGF0dGVybi5jb21waWxlKHBhdHRlcm4pOwogICAgICAgIE1hdGNoZXIgbSA9IHIubWF0Y2hlcih0ZXh0KTsKICAgICAgICBTdHJpbmdCdWZmZXIgc2IgPSBuZXcgU3RyaW5nQnVmZmVyKCk7CiAgICAgICAgd2hpbGUgKG0uZmluZCgpKSB7CiAgICAgICAgICAgIG0uYXBwZW5kUmVwbGFjZW1lbnQoc2IsIG0uZ3JvdXAoMCkucmVwbGFjZUZpcnN0KFBhdHRlcm4ucXVvdGUobS5ncm91cCgxKSksICI8LS0tPiIpKTsKICAgICAgICB9CiAgICAgICAgbS5hcHBlbmRUYWlsKHNiKTsgLy8gYXBwZW5kIHRoZSByZXN0IG9mIHRoZSBjb250ZW50cwogICAgICAgIFN5c3RlbS5vdXQucHJpbnRsbihzYi50b1N0cmluZygpKTsKCX0KfQ==