#include <bits/stdc++.h>
using namespace std;
const double pi = acos(-1.0);
const double eps = 1e-8;
vector<string> parse(string s, string c) {
  int len = c.length(), p = -len, np;
  vector<string> ans;
  do {
    np = s.find(c, p + len);
    ans.push_back(s.substr(p + len, np - p - len));
    p = np;
  } while (p != string::npos);
  return ans;
}
int main() {
  ios_base::sync_with_stdio(0);
  string sent, in = "<3";
  int n;
  cin >> n;
  string tp;
  for (int i = 1; i <= n; i++) {
    cin >> tp;
    in += tp + "<3";
  }
  cin >> sent;
  int i = 0, j = 0, dn = 0;
  while ((i < in.size()) && (j < sent.size())) {
    if (in[i] == sent[j]) {
      dn++;
      i++;
      j++;
    } else {
      j++;
    }
  }
  if (dn == in.size()) {
    cout << "yes\n";
    return 0;
  }
  cout << "no\n";
  return 0;
}
