importPackage(java.io);
importPackage(java.lang);
var reader = new BufferedReader( new InputStreamReader(System['in']) );
while(true) {
var line = reader.readLine();
if(line == null || line == "42") {
break;
} else {
System.out.println(line);
}
}
aW1wb3J0UGFja2FnZShqYXZhLmlvKTsKaW1wb3J0UGFja2FnZShqYXZhLmxhbmcpOwoKdmFyIHJlYWRlciA9IG5ldyBCdWZmZXJlZFJlYWRlciggbmV3IElucHV0U3RyZWFtUmVhZGVyKFN5c3RlbVsnaW4nXSkgKTsKCndoaWxlKHRydWUpIHsKCXZhciBsaW5lID0gcmVhZGVyLnJlYWRMaW5lKCk7CglpZihsaW5lID09IG51bGwgfHwgbGluZSA9PSAiNDIiKSB7CgkJYnJlYWs7Cgl9IGVsc2UgewoJCVN5c3RlbS5vdXQucHJpbnRsbihsaW5lKTsKCX0KfQ==