var StringDecoder = require('string_decoder').StringDecoder
var decoder = new StringDecoder('utf8')
var stdin = process.stdin
var sbuf = ''
pull()
function pull() {
setImmediate(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)
}
dmFyIFN0cmluZ0RlY29kZXIgPSByZXF1aXJlKCdzdHJpbmdfZGVjb2RlcicpLlN0cmluZ0RlY29kZXIKdmFyIGRlY29kZXIgPSBuZXcgU3RyaW5nRGVjb2RlcigndXRmOCcpCnZhciBzdGRpbiA9IHByb2Nlc3Muc3RkaW4KdmFyIHNidWYgPSAnJwoKcHVsbCgpCgpmdW5jdGlvbiBwdWxsKCkgewoJc2V0SW1tZWRpYXRlKHB1bGwpCgl2YXIgYnVmID0gc3RkaW4ucmVhZCgpCglpZiAoIWJ1ZikgcmV0dXJuCglzYnVmICs9IGRlY29kZXIud3JpdGUoYnVmKQoJdmFyIGkgPSBzYnVmLmluZGV4T2YoJ1xuJykKCWlmIChpID09IC0xKSByZXR1cm4KCW9uTGluZShzYnVmLnNsaWNlKDAsaSkpCglzYnVmID0gc2J1Zi5zbGljZShpKzEpCn0KCmZ1bmN0aW9uIG9uTGluZShsaW5lKSB7Cgljb25zb2xlLmxvZyhsaW5lKQp9