process.stdin.resume();
process.stdin.setEncoding('utf8');
// your code goes here
function linesGetter() {
var partial = ""
return function(chunk) {
var lines = (partial + chunk.toString()).split('\n')
partial = lines.pop()
return lines
}
}
function flatMap(f, xs) {
return xs.reduce(function(acc, x, _, _) { return acc.concat(f(x)) }, [])
}
function uniqFilter() {
var seen = {}
return function(xs) {
return xs.filter(function(x, _, _) {
return (x in seen) ? false : (seen[x] = true)
})
}
}
function main() {
var getlines = linesGetter()
var uniq = uniqFilter()
process.stdin.on('data', function(chunk) {
var words = flatMap(function(x) { return x.match(/\S+/g) || [] },
getlines(chunk))
uniq(words).forEach(function(x, _, _) { console.log(x) })
})
}
main()
cHJvY2Vzcy5zdGRpbi5yZXN1bWUoKTsKcHJvY2Vzcy5zdGRpbi5zZXRFbmNvZGluZygndXRmOCcpOwoKLy8geW91ciBjb2RlIGdvZXMgaGVyZQpmdW5jdGlvbiBsaW5lc0dldHRlcigpIHsKICAgIHZhciBwYXJ0aWFsID0gIiIKICAgIHJldHVybiBmdW5jdGlvbihjaHVuaykgewogICAgICAgIHZhciBsaW5lcyA9IChwYXJ0aWFsICsgY2h1bmsudG9TdHJpbmcoKSkuc3BsaXQoJ1xuJykKICAgICAgICBwYXJ0aWFsID0gbGluZXMucG9wKCkKICAgICAgICByZXR1cm4gbGluZXMKICAgIH0KfQpmdW5jdGlvbiBmbGF0TWFwKGYsIHhzKSB7CiAgICByZXR1cm4geHMucmVkdWNlKGZ1bmN0aW9uKGFjYywgeCwgXywgXykgeyByZXR1cm4gYWNjLmNvbmNhdChmKHgpKSB9LCBbXSkKfQpmdW5jdGlvbiB1bmlxRmlsdGVyKCkgewogICAgdmFyIHNlZW4gPSB7fQogICAgcmV0dXJuIGZ1bmN0aW9uKHhzKSB7CiAgICAgICAgcmV0dXJuIHhzLmZpbHRlcihmdW5jdGlvbih4LCBfLCBfKSB7CiAgICAgICAgICAgIHJldHVybiAoeCBpbiBzZWVuKSA/IGZhbHNlIDogKHNlZW5beF0gPSB0cnVl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