var Main = function (input) { var elements = input.split(""); var ary1 = elements.map(function(item, i){ var num = elements[i].charCodeAt(0); num = (((num - 65) - (i + 1) + 25) % 25) +65 return String.fromCharCode(num); }); console.log(ary1.join('')) }; //Don't Edit this code Main(require("fs").readFileSync("/dev/stdin", "utf8"));