#include <bits/stdc++.h>
using namespace std;
int main() {
  long long n;
  cin >> n;
  string ori = "<3";
  string tmp;
  for (long long i = 0; i < n; i++) {
    cin >> tmp;
    ori += tmp;
    ori += "<3";
  }
  string encode, test;
  cin >> encode;
  long long idx = 0;
  int ok = 0;
  for (long long i = 0; i < encode.length(); i++) {
    if (encode[i] == ori[idx]) {
      idx++;
    }
    if (idx >= ori.length()) {
      ok = 1;
      break;
    }
  }
  if (!ok)
    cout << "no" << endl;
  else
    cout << "yes" << endl;
  return 0;
}
