var StringDecoder = require('string_decoder').StringDecoder
var decoder = new StringDecoder('utf8')
var stdin = process.stdin
var sbuf = ''
stdin.on('data', pull)
function pull(buf) {
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)
}
dmFyIFN0cmluZ0RlY29kZXIgPSByZXF1aXJlKCdzdHJpbmdfZGVjb2RlcicpLlN0cmluZ0RlY29kZXIKdmFyIGRlY29kZXIgPSBuZXcgU3RyaW5nRGVjb2RlcigndXRmOCcpCnZhciBzdGRpbiA9IHByb2Nlc3Muc3RkaW4KdmFyIHNidWYgPSAnJwoKc3RkaW4ub24oJ2RhdGEnLCBwdWxsKQoKZnVuY3Rpb24gcHVsbChidWYpIHsKCgoJaWYgKCFidWYpIHJldHVybgoJc2J1ZiArPSBkZWNvZGVyLndyaXRlKGJ1ZikKCXZhciBpID0gc2J1Zi5pbmRleE9mKCdcbicpCglpZiAoaSA9PSAtMSkgcmV0dXJuCglvbkxpbmUoc2J1Zi5zbGljZSgwLGkpKQoJc2J1ZiA9IHNidWYuc2xpY2UoaSsxKQp9CgpmdW5jdGlvbiBvbkxpbmUobGluZSkgewoJY29uc29sZS5sb2cobGluZSkKfQ==