#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  cin >> n;
  string scan;
  string check;
  check = "<3";
  int i;
  for (i = 0; i < n; i++) {
    cin >> scan;
    check += scan;
    check += "<3";
  }
  string encode;
  cin >> encode;
  int l = encode.length();
  int j = 0, flag = 0;
  for (i = 0; i < l; i++) {
    char a = encode[i];
    if (check[j] == a) {
      j++;
      if (j == check.length()) break;
    }
  }
  if (j == check.length())
    cout << "yes\n";
  else
    cout << "no\n";
  return 0;
}
