//config = { input: 'tmp', newline: '\r\n' }; // win
config = { input: '/dev/stdin', newline: '\n' }; // linux

ary = require('fs')
	.readFileSync(config.input, 'ascii')
	.trim()
	.split('');

ary.reverse();

console.log(ary.join(''));