#include <bits/stdc++.h>
using namespace std;
map<string, int> mp;
int main() {
  int n;
  string s, s2, s1;
  int i, j;
  cin >> n;
  s = "<3";
  for (i = 1; i <= n; i++) {
    cin >> s1;
    s += s1;
    s += "<3";
  }
  cin >> s2;
  for (i = 0, j = 0; i < s2.size();) {
    if (s2[i] == s[j])
      i++, j++;
    else
      while (s2[i] != s[j]) i++;
  }
  if (j != s.size())
    cout << "no" << endl;
  else
    cout << "yes" << endl;
}
