#include <bits/stdc++.h>
using namespace std;
int n, m, k, i, a, d[1005], j;
string s, x, c;
int main() {
  cin >> n;
  s = "<3";
  for (i = 0; i < n; i++) {
    cin >> x;
    s += x;
    s += "<3";
  }
  m = s.size();
  cin >> c;
  a = c.size();
  for (i = 0; i < a; i++) {
    if (c[i] == s[k]) k++;
    if (k >= m) {
      cout << "yes";
      return 0;
    }
  }
  cout << "no";
  return 0;
}
