#include <bits/stdc++.h>
using namespace std;
int main() {
  int test = 1;
  while (test--) {
    int n;
    cin >> n;
    string s = "<3", x;
    for (int i = 0; i < n; i++) {
      cin >> x;
      s.append(x);
      s.append("<3");
    }
    string a;
    cin >> a;
    int t = 0;
    for (int i = 0; i < a.length(); i++) {
      if (s[t] == a[i]) t++;
    }
    if (t == s.length())
      cout << "yes";
    else
      cout << "no";
  }
  return 0;
}
