#include <iostream>
using namespace std;
int main()
{
int i;
char a[5],b[5];
cout<<"请输入要加密的密码"<<endl;
for(i=0;i<5;i++)
{
cin>>a[i];
if((a[i]>=65&&a[i]<=86)||(a[i]>=97&&a[i]<=118))
b[i]=a[i]+4;
else
b[i]=a[i]-22;
cout<<b[i];
}
cout<<endl;
cout<<"请输入要解密的密码"<<endl;
for(i=0;i<5;i++)
{
cin>>a[i];
if((a[i]>=69||a[i]<=90)||(a[i]>=101&&a[i]<=122))
b[i]=a[i]-4;
else
b[i]=a[i]+22;
cout<<b[i];
}
cout<<endl;
return 0;
}