proc shift(c: char, d: int): char = let offset = (ord(c) - ord('A') + 26 + (d mod 26)) mod 26 return char(ord('A') + offset) let S = readLine(stdin) for i, c in S.pairs: stdout.write(shift(c, -(i+1))) echo ""