Solve SRM 147, Div 2, Problem CCipher