using System; using System.Linq; using System.Text; namespace TestBench { internal class Program { internal static void Main() { var array = Enumerable.Range(0x41, 26).Select(x => (char) x).ToArray(); Console.WriteLine(Console.ReadLine().Select((c, i) => new {value = c - 0x41, offset = (i + 1)%26}) .Select(x => x.value - x.offset).Select(x => x < 0 ? 26 + x : x).Select(x => array[x]) .Aggregate(new StringBuilder(), (bld, c) => bld.Append(c), bld => bld.ToString())); } } }