#include <bits/stdc++.h>
using namespace std;
const int N = 100010;
string a[N];
int n;
int main() {
  cin >> n;
  for (int i = 0; i < (n); i++) {
    cin >> a[i];
    a[i] = "<3" + a[i];
  }
  a[n - 1] += "<3";
  int now = 0;
  string w;
  cin >> w;
  int p = 0;
  for (int i = 0; i < w.size(); i++) {
    if (w[i] == a[now][p]) {
      p++;
      if (p == a[now].size()) {
        p = 0;
        now++;
      }
    }
  }
  if (now == n)
    puts("yes");
  else
    puts("no");
}
