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