#include <bits/stdc++.h>
using namespace std;
int main() {
  string cheek = "<3";
  string add, control;
  long n;
  cin >> n;
  for (long i = 0; i < n; i++) {
    cin >> add;
    cheek += add + "<3";
  }
  cin >> control;
  n = control.length();
  long j = -1, i = 0;
  bool ok = true;
  while (ok && i < cheek.length()) {
    do {
      ok = cheek[i] == control[++j];
    } while (j < n - 1 && cheek[i] != control[j]);
    i++;
  }
  if (ok)
    cout << "yes";
  else
    cout << "no";
  return 0;
}
