b=""
c=input("请输入明文:")
for i in range(len(c)):
if 'a'<=c[i]<='w' or 'A'<=c[i]<='W':
b+=chr(ord(c[i])+3)
elif 'x'<=c[i]<='z' or 'X'<=c[i]<='Z':
b+=chr(ord(c[i])-23)
else:
b+=c[i]
print("加密后的密文是:",b,sep='')
b=""
c=input("请输入明文:")
for i in range(len(c)):
if 'a'<=c[i]<='w' or 'A'<=c[i]<='W':
b+=chr(ord(c[i])+3)
elif 'x'<=c[i]<='z' or 'X'<=c[i]<='Z':
b+=chr(ord(c[i])-23)
else:
b+=c[i]
print("加密后的密文是:",b,sep='')