#include <bits/stdc++.h>
using namespace std;
long long i, j, m, n, p, q, r, l, k;
string s, a, c;
vector<long long> v;
int f;
int main() {
  cin >> n;
  for (i = 0; i < n; i++) {
    s += "<3";
    cin >> a;
    s += a;
  }
  s += "<3";
  cin >> a;
  l = a.size();
  for (i = 0; i < l; i++) {
    if (s[k] == a[i]) k++;
  }
  if (k == s.size())
    cout << "yes";
  else
    cout << "no";
}
