import std.algorithm; import std.array; import std.conv; import std.stdio; import std.string; void main() { auto s = readln.chomp; const a = 'Z' - 'A' + 1; auto r = ""; foreach (i, c; s) { auto d = (c - 'A' + a - (i + 1) % a) % a + 'A'; r ~= d.to!char; } writeln(r); }