#include <bits/stdc++.h>
using namespace std;
int const Max = 101101;
int n;
string word[Max];
string sms;
string heart;
string s;
int len;
int main() {
  cin >> n;
  for (int i = 1; i <= n; i++) cin >> word[i];
  cin >> sms;
  heart = "<3";
  s = "";
  for (int i = 1; i <= n; i++) {
    s += heart;
    s += word[i];
  }
  s += heart;
  len = s.length();
  int p = -1;
  int lensms = sms.length();
  bool ans = true;
  for (int i = 0; i < len; i++) {
    bool f = false;
    for (int j = p + 1; j < lensms; j++)
      if (sms[j] == s[i]) {
        f = true;
        p = j;
        break;
      }
    if (!f) {
      ans = false;
      break;
    }
  }
  if (ans)
    cout << "yes" << endl;
  else
    cout << "no" << endl;
}
