#include <stdio.h> int main() { int n = 0; scanf("%d", &n); getchar();//吸取空格 char a[4] = { 0 }; int i = 0; while (i < 4) { scanf("%c", &a[i]); getchar();//吸取空格 i++; } char arr[100] = { 0 }; i = 0; for (i = 0; i < n; i++) { scanf("%c", &arr[i]); if(arr[i]==a[0]) arr[i]=a[1]; if(arr[i]==a[2]) arr[i]=a[3]; printf("%c", arr[i]); } return 0; }