#include <bits/stdc++.h>
using namespace std;
int n;
string word[111111];
char sent[1111111];
int main() {
  scanf("%d", &n);
  for (int i = 1; i <= n; i++) cin >> word[i];
  scanf("%s", sent);
  int wa = 0, tail = 0, ww = 0;
  int len = strlen(sent);
  for (int i = 1; i <= n; i++) {
    while (tail < len && sent[tail] != '<') tail++;
    tail++;
    while (tail < len && sent[tail] != '3') tail++;
    tail++;
    for (int k = 0; k < word[i].size(); k++) {
      while (tail < len && word[i][k] != sent[tail]) tail++;
      tail++;
    }
    if (tail < len) ww++;
  }
  bool p1 = 0, p2 = 0;
  while (tail < len && sent[tail] != '<') tail++;
  if (sent[tail] == '<') p1 = 1, tail++;
  while (tail < len && sent[tail] != '3') tail++;
  if (sent[tail] == '3') p2 = 1, tail++;
  if (p1 && p2) ww++;
  while (tail < len) tail++;
  if (ww == n + 1)
    printf("yes\n");
  else
    printf("no\n");
}
