#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  string x;
  string y;
  string m;
  bool flag = false;
  cin >> n;
  for (int i = 0; i < n; i++) {
    cin >> x;
    y = y + "<3" + x;
    if (i == n - 1) y += "<3";
  }
  cin >> m;
  int j = 0;
  for (int i = 0; i < m.length(); i++) {
    if (m[i] == y[j]) j++;
    if (j == y.length()) {
      flag = true;
      break;
    }
  }
  if (flag)
    cout << "yes" << endl;
  else
    cout << "no" << endl;
  return 0;
}
