#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  string s = "<3", t;
  scanf("%d", &n);
  for (int i = 0; i < n; i++) {
    cin >> t;
    s += t;
    s += "<3";
  }
  cin >> t;
  int i = 0, j = 0;
  while (i < s.length() && j < t.length()) {
    if (s[i] == t[j])
      i++, j++;
    else {
      j++;
    }
  }
  if (i < s.length()) {
    printf("no\n");
    return 0;
  }
  printf("yes\n");
  return 0;
}
