#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  cin >> n;
  string smain = "<3";
  while (n--) {
    string str;
    cin >> str;
    smain += str + "<3";
  }
  string lovestr;
  cin >> lovestr;
  int pointer = 0;
  for (int i = 0; i < lovestr.size(); i++)
    if (lovestr[i] == smain[pointer]) pointer++;
  if (pointer == smain.size())
    cout << "yes" << endl;
  else
    cout << "no" << endl;
}
