// No.1335 1337 package main import ( "fmt" "strconv" ) func main() { var a, s string fmt.Scan(&a, &s) m := map[int]string{} for i := 0; i < 10; i++ { m[i] = string(a[i]) } var ans string for _, r := range s { x, err := strconv.Atoi(string(r)) if err != nil { ans += string(r) } else { ans += m[x] } } fmt.Println(ans) }