#include <bits/stdc++.h>
const int MAXN = 1000 * 1000;
const double eps = 1e-6;
using namespace std;
int n, i, ind, ind2;
string w = "", a, k;
int main() {
  cin >> n;
  for (i = 0; i < n; i++) {
    cin >> a;
    w += "<3" + a;
  }
  w += "<3";
  cin >> k;
  for (i = 0; i < k.size(); i++) {
    if (!(k[i] >= 97 && k[i] <= 122) && k[i] != '<' && k[i] != '>' &&
        !(k[i] >= 48 && k[i] <= 57)) {
      cout << "no";
      return 0;
    }
    if (k[i] == w[ind]) {
      ind++;
      if (ind >= w.size()) {
        ind2 = i + 1;
        break;
      }
    }
  }
  if (ind < w.size()) {
    cout << "no";
    return 0;
  }
  for (i = ind2; i < k.size(); i++) {
    if (!(k[i] >= 97 && k[i] <= 122) && k[i] != '<' && k[i] != '>' &&
        !(k[i] >= 48 && k[i] <= 57)) {
      cout << "no";
      return 0;
    }
  }
  cout << "yes";
  return 0;
}
