#include <iostream>
#include <string>
#include <fstream>
using namespace std;
int main(int argc,int **argv){
ifstream cin("b.txt");
int n ;
cin>>n;
string s;
for (int i =0;i <n;++i)
{
cin>>s;
cout<<"String"<<" #"<<i+1<<endl;
for (string::iterator it = s.begin();it !=s.end();++it){
if(*it!='Z')
*it = *it +1;
else
*it = 'A';
}
cout<<s<<endl;
cout<<endl;
}
}