#include<bits/stdc++.h>
using namespace std;
// #Placement
// abc def azy
// ccc fff cay
int main(){
char ws;
int t;
cin>>t;
ws=cin.get();
while(t--){
string str;
getline(cin,str);
string alpha="abcdefghijklmnopqrstuvwxyz";
stringstream ss(str);
string temp;
string ans;
while(ss>>temp){
for(int i=0;i<temp.size();i++){
int ind=temp[temp.size()-1-i]-'a';
temp[temp.size()-1-i]=alpha[(ind+i)%26];
}
ans+=temp;
ans.push_back(' ');
}
ans.pop_back(); // to remove space after last word
cout<<ans<<endl;
}
return 0;
}