class Ex1 {
public static void main
(String[] args
) { String entrada
= "Abobora Vermelha"; StringBuilder resultado = new StringBuilder(entrada.length());
for (String s
: entrada.
split(" ")) { if (resultado.length() != 0) resultado.append(' ');
for (int x = s.length() - 1; x >= 0; x--) {
resultado.append(s.charAt(x));
}
}
System.
out.
println(resultado
); }
}
Y2xhc3MgRXgxIHsKICAgIHB1YmxpYyBzdGF0aWMgdm9pZCBtYWluKFN0cmluZ1tdIGFyZ3MpIHsKICAgICAgICBTdHJpbmcgZW50cmFkYSA9ICJBYm9ib3JhIFZlcm1lbGhhIjsKICAgICAgICBTdHJpbmdCdWlsZGVyIHJlc3VsdGFkbyA9IG5ldyBTdHJpbmdCdWlsZGVyKGVudHJhZGEubGVuZ3RoKCkpOwoKICAgICAgICBmb3IgKFN0cmluZyBzIDogZW50cmFkYS5zcGxpdCgiICIpKSB7CiAgICAgICAgICAgIGlmIChyZXN1bHRhZG8ubGVuZ3RoKCkgIT0gMCkgcmVzdWx0YWRvLmFwcGVuZCgnICcpOwogICAgICAgICAgICBmb3IgKGludCB4ID0gcy5sZW5ndGgoKSAtIDE7IHggPj0gMDsgeC0tKSB7CiAgICAgICAgICAgICAgICByZXN1bHRhZG8uYXBwZW5kKHMuY2hhckF0KHgpKTsKICAgICAgICAgICAgfQogICAgICAgIH0KICAgICAgICBTeXN0ZW0ub3V0LnByaW50bG4ocmVzdWx0YWRvKTsKICAgIH0KfQ==