#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  string a = "<3";
  string b;
  string t;
  cin >> n;
  cin.ignore(100, '\n');
  for (int i = 0; i < n; i++) {
    getline(cin, t);
    a += t;
    a += "<3";
  }
  getline(cin, b);
  int j = -1;
  for (int i = 0; i < a.length(); i++) {
    j++;
    while (j < b.size() && a[i] != b[j]) {
      j++;
    }
  }
  if (j >= b.size()) {
    cout << "no" << endl;
  } else {
    cout << "yes" << endl;
  }
  return 0;
}
