process.stdin.resume();
process.stdin.setEncoding('utf8');
function encrypt(plain, cipher, text) {
plain = plain + plain.toUpperCase();
cipher = cipher + cipher.toUpperCase();
var newText = '';
for(var i=0; i<text.length; i++) {
var c = text.charAt(i);
var index = plain.indexOf(c);
if(index >= 0 && index < cipher.length) {
newText += cipher.charAt(index);
} else {
newText += c;
}
}
return newText;
}
var plainAlphabet = "abcdefghijklmnopqrstuvwxyz";
var cipherAlphabet = "zyxwvutsrqponmlkjihgfedcba";
var text = "Some sensitive text that only humans must be able to read";
var encodedText = encrypt(plainAlphabet, cipherAlphabet, text);
process.stdout.write(encodedText);
cHJvY2Vzcy5zdGRpbi5yZXN1bWUoKTsKcHJvY2Vzcy5zdGRpbi5zZXRFbmNvZGluZygndXRmOCcpOwoKZnVuY3Rpb24gZW5jcnlwdChwbGFpbiwgY2lwaGVyLCB0ZXh0KSB7CglwbGFpbiA9IHBsYWluICsgcGxhaW4udG9VcHBlckNhc2UoKTsKCWNpcGhlciA9IGNpcGhlciArIGNpcGhlci50b1VwcGVyQ2FzZSgpOwoJCgl2YXIgbmV3VGV4dCA9ICcnOwoJZm9yKHZhciBpPTA7IGk8dGV4dC5sZW5ndGg7IGkrKykgewoJCXZhciBjID0gdGV4dC5jaGFyQXQoaSk7CgkJdmFyIGluZGV4ID0gcGxhaW4uaW5kZXhPZihjKTsKCQlpZihpbmRleCA+PSAwICYmIGluZGV4IDwgY2lwaGVyLmxlbmd0aCkgewoJCQluZXdUZXh0ICs9IGNpcGhlci5jaGFyQXQoaW5kZXgpOwoJCX0gZWxzZSB7CgkJCW5ld1RleHQgKz0gYzsKCQl9Cgl9CglyZXR1cm4gbmV3VGV4dDsKfQoKdmFyIHBsYWluQWxwaGFiZXQgPSAiYWJjZGVmZ2hpamtsbW5vcHFyc3R1dnd4eXoiOwp2YXIgY2lwaGVyQWxwaGFiZXQgPSAienl4d3Z1dHNycXBvbm1sa2ppaGdmZWRjYmEiOwp2YXIgdGV4dCA9ICJTb21lIHNlbnNpdGl2ZSB0ZXh0IHRoYXQgb25seSBodW1hbnMgbXVzdCBiZSBhYmxlIHRvIHJlYWQiOwoKdmFyIGVuY29kZWRUZXh0ID0gZW5jcnlwdChwbGFpbkFscGhhYmV0LCBjaXBoZXJBbHBoYWJldCwgdGV4dCk7CnByb2Nlc3Muc3Rkb3V0LndyaXRlKGVuY29kZWRUZXh0KTsK