import java.util.*;
import java.util.regex.*;
import java.lang.*;
import java.io.*;
class Ideone
{
{
String linha
= "Jõao Ferreira da Silva";
Pattern r = Pattern.compile(pattern);
Matcher m = r.matcher(linha);
if (m.find( )) {
System.
out.
println(m.
group(0) ); }
}
}
aW1wb3J0IGphdmEudXRpbC4qOwppbXBvcnQgamF2YS51dGlsLnJlZ2V4Lio7CmltcG9ydCBqYXZhLmxhbmcuKjsKaW1wb3J0IGphdmEuaW8uKjsKCmNsYXNzIElkZW9uZQp7CglwdWJsaWMgc3RhdGljIHZvaWQgbWFpbiAoU3RyaW5nW10gYXJncykgdGhyb3dzIGphdmEubGFuZy5FeGNlcHRpb24KCXsKCSAgU3RyaW5nIGxpbmhhID0gIkrDtWFvIEZlcnJlaXJhIGRhIFNpbHZhIjsKICAgICAgU3RyaW5nIHBhdHRlcm4gPSAiXFxTKyI7CgogICAgICBQYXR0ZXJuIHIgPSBQYXR0ZXJuLmNvbXBpbGUocGF0dGVybik7CiAgICAgIE1hdGNoZXIgbSA9IHIubWF0Y2hlcihsaW5oYSk7CiAgICAgIGlmIChtLmZpbmQoICkpIHsKICAgICAgCVN5c3RlbS5vdXQucHJpbnRsbihtLmdyb3VwKDApICk7CiAgICAgIH0KCX0KfQ==