#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  cin >> n;
  string msg = "<3", temp;
  for (int i = 0; i < n; i++) {
    cin >> temp;
    msg += (temp + "<3");
  }
  string sent;
  cin >> sent;
  int l1 = msg.length();
  int l2 = sent.length();
  int j = 0;
  for (int i = 0; i < l1; i++) {
    while (sent[j] != msg[i] && j < l2) j++;
    if (j == l2) break;
    if (i != (l1 - 1)) j++;
  }
  if (j == l2)
    cout << "no";
  else
    cout << "yes";
  return 0;
}
