#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(false);
  int n;
  string s = "<3", t;
  cin >> n;
  while (n--) {
    string in;
    cin >> in;
    s += in + "<3";
  }
  cin >> t;
  for (int i = 0, j = 0; i < ((int)(s).size()); i++) {
    while (j < ((int)(t).size()) && s[i] != t[j]) j++;
    if (j == ((int)(t).size())) return puts("no"), 0;
    j++;
  }
  puts("yes");
  return 0;
}
