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