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