/* -*- coding: utf-8 -*- * * 1335.cc: No.1335 1337 - yukicoder */ #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include using namespace std; /* constant */ const int MAX_N = 100; /* typedef */ /* global variables */ char a[16], s[MAX_N + 4]; /* subroutines */ /* main */ int main() { scanf("%s%s", a, s); for (int i = 0; s[i]; i++) { if (s[i] >= '0' && s[i] <= '9') putchar(a[s[i] - '0']); else putchar(s[i]); } putchar('\n'); return 0; }