#include <bits/stdc++.h>
using namespace std;
string str, t, s;
int main() {
  int n;
  while (scanf("%d", &n) != EOF) {
    str = "<3";
    while (n--) {
      cin >> s;
      str += s;
      str += "<3";
    }
    cin >> t;
    int cnt = 0, len1 = str.length();
    int len2 = t.length();
    for (int i = 0; i < len2; i++) {
      if (cnt == len1) {
        break;
      }
      if (str[cnt] == t[i]) {
        cnt++;
      }
    }
    if (cnt == len1)
      printf("yes\n");
    else
      printf("no\n");
  }
  return 0;
}
