#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, c = 0;
  string kelma = "", word, x;
  cin >> n;
  for (int i = 0; i < n; i++) {
    kelma += "<3";
    cin >> x;
    kelma += x;
  }
  kelma += "<3";
  cin >> word;
  for (int i = 0; i < word.size(); i++)
    if (kelma[c] == word[i]) c++;
  if (c == kelma.size())
    cout << "yes" << endl;
  else
    cout << "no" << endl;
  return 0;
}
