#include <bits/stdc++.h>
using namespace std;
int com(const void *a, const void *b) { return *(int *)a - *(int *)b; }
int main(void) {
  int n, i, word = 0, z, r = 0;
  bool s1 = 0, s2 = 0;
  cin >> n;
  string *a;
  n++;
  a = new string[n];
  for (i = 0; n - i; i++) {
    cin >> a[i];
  }
  z = n - 1;
  n = a[n - 1].size();
  for (i = 0; n - i; i++) {
    if (z - word == 0 && s1 != 0 && s2 != 0) break;
    if (a[z][i] == '<') s1 = 1;
    if (a[z][i] == '3' && s1) s2 = 1;
    if (s1 && s2 && a[z][i] == a[word][r]) {
      r++;
      if (r == a[word].size()) {
        r = 0;
        word++;
        s1 = 0;
        s2 = 0;
      }
    }
  }
  if (z - word == 0 && s1 != 0 && s2 != 0)
    cout << "yes";
  else
    cout << "no";
}
