按照题意写就可以了
## 注意是小写字母
key = input()
st = input()
old_dict = list(map(chr,range(97,123)))## 小写字母表
new_dic =[]
## 构造新字典
for e in key:
if e in new_dic:continue
else:new_dic.append(e)
for e in old_dict:
if e in new_dic:continue
else:new_dic.append(e)
# 加密字符串
res =''
for e in st:
res +=new_dic[old_dict.index(e)]
print(res)