#include #include #include using namespace std; int main(){ int i, j, n; string A = "ABCDEFGHIJKLMNOPQRSTUVWXYZ"; string S; string str = {}; cin >> S; for( i = 0; i < S.size(); i++ ) { n = i % A.size(); //cout << n << " "; for( j = 0; j < A.size(); j++){ if( S[i] == A[j]){ //cout << j << " "; break; } } if ( n + 1 > j ) { n = A.size() - ((n + 1) - j); } else { n = j - (n + 1); } //cout << n << endl; str += A[n]; } cout << str << endl; return 0; }