#include <bits/stdc++.h>
using namespace std;
int main() {
  string a = "<3";
  string b;
  int n;
  cin >> n;
  for (int i = 0; i < n; i++) {
    cin >> b;
    a += b + "<3";
  }
  string c;
  cin >> c;
  int len1 = c.size();
  int len2 = a.size();
  int curr = 0;
  for (int i = 0; i < len1; i++) {
    if (a[curr] == c[i]) curr++;
    if (curr == len2) break;
  }
  if (curr == len2)
    cout << "yes";
  else
    cout << "no";
  return 0;
}
