#include<bits/stdc++.h>
using namespace std;
int main()
{
int t;
string s;
while(cin>>t)
{
for(int m=0;m<t;m++)
{
cin>>s;
for(int i=0;i<s[i];i++)
{
s[i]+=3;
if(s[i]>'Z') s[i]-=26;
//else s[i]='A'+3-('Z'-s[i]);
}
cout<<s<<endl;
}
}
}