#include <bits/stdc++.h>
using namespace std;
int n;
string word[100005];
string encode;
string str;
int main() {
  cin >> n;
  str = "<3";
  for (int i = 0; i < n; i++) {
    cin >> word[i];
    str += word[i];
    str += "<3";
  }
  cin >> encode;
  bool flag = true;
  int len = encode.length();
  int len2 = str.length();
  for (int i = 0, j = 0; i < len2; i++, j++) {
    while (j < len && str[i] != encode[j]) j++;
    if (j >= len) {
      flag = false;
      break;
    }
  }
  if (flag)
    cout << "yes" << endl;
  else
    cout << "no" << endl;
  return 0;
}
