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