#include <bits/stdc++.h>
using namespace std;
string c, t, temp;
int n, i;
int tt, cnt;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  cin >> n;
  c += "<3";
  for (i = 0; i < n; i++) {
    cin >> temp;
    c += temp;
    c += "<3";
  }
  cin >> t;
  tt = t.length();
  for (i = 0; i < tt; i++) {
    if (t[i] == c[cnt]) cnt++;
  }
  if (cnt == c.length())
    cout << "yes" << endl;
  else
    cout << "no" << endl;
}
