#include #include #define S_LEN 1024 using namespace std; int main() { char S[S_LEN + 1]; int size = 'Z' - 'A' + 1; cin >> S; int len = strlen(S); for (int i = 0; i < len; ++i) { S[i] = (S[i] - 'A' - ((i + 1) % size) + size) % size + 'A'; } cout << S; return 0; }