var StringDecoder = require('string_decoder').StringDecoder
var decoder = new StringDecoder('utf8')
var stdin = process.stdin
var sbuf = ''
stdin.on('readable', pull)
function pull() {
var buf = stdin.read()
if (!buf) return
sbuf += decoder.write(buf)
var i = sbuf.indexOf('\n')
if (i == -1) return
onLine(sbuf.slice(0,i))
sbuf = sbuf.slice(i+1)
}
function onLine(line) {
console.log(line)
}
dmFyIFN0cmluZ0RlY29kZXIgPSByZXF1aXJlKCdzdHJpbmdfZGVjb2RlcicpLlN0cmluZ0RlY29kZXIKdmFyIGRlY29kZXIgPSBuZXcgU3RyaW5nRGVjb2RlcigndXRmOCcpCnZhciBzdGRpbiA9IHByb2Nlc3Muc3RkaW4KdmFyIHNidWYgPSAnJwoKc3RkaW4ub24oJ3JlYWRhYmxlJywgcHVsbCkKCmZ1bmN0aW9uIHB1bGwoKSB7CgkKCXZhciBidWYgPSBzdGRpbi5yZWFkKCkKCWlmICghYnVmKSByZXR1cm4KCXNidWYgKz0gZGVjb2Rlci53cml0ZShidWYpCgl2YXIgaSA9IHNidWYuaW5kZXhPZignXG4nKQoJaWYgKGkgPT0gLTEpIHJldHVybgoJb25MaW5lKHNidWYuc2xpY2UoMCxpKSkKCXNidWYgPSBzYnVmLnNsaWNlKGkrMSkKfQoKZnVuY3Rpb24gb25MaW5lKGxpbmUpIHsKCWNvbnNvbGUubG9nKGxpbmUpCn0=