import java.io.*;
public class Main {
while ((linha = br.readLine()) != null) {
// TODO: lógica
}
}
}
aW1wb3J0IGphdmEuaW8uKjsKCnB1YmxpYyBjbGFzcyBNYWluIHsKCglwdWJsaWMgc3RhdGljIHZvaWQgbWFpbihTdHJpbmdbXSBhcmdzKSB0aHJvd3MgSU9FeGNlcHRpb24gewoJCUJ1ZmZlcmVkUmVhZGVyIGJyID0gbmV3IEJ1ZmZlcmVkUmVhZGVyKG5ldyBJbnB1dFN0cmVhbVJlYWRlcihTeXN0ZW0uaW4pKTsKCQlTdHJpbmcgbGluaGE7CgoJCXdoaWxlICgobGluaGEgPSBici5yZWFkTGluZSgpKSAhPSBudWxsKSB7CgkJCWludCBuID0gSW50ZWdlci5wYXJzZUludChsaW5oYSk7CgkJCS8vIFRPRE86IGzDs2dpY2EKCQkJU3lzdGVtLm91dC5wcmludGxuKG4gPT0gMTApOwoJCX0KCX0KCn0=