#include <bits/stdc++.h>
using namespace std;
const int oo = 0x3f3f3f3f;
const double eps = 1e-9;
string v[100005], s;
int nextSign[100005][40];
inline int getC(char c) {
  if ('a' <= c && c <= 'z') return c - 'a';
  if ('0' <= c && c <= '9') return 26 + c - '0';
  if (c == '<') return 36;
  return 37;
}
bool works;
inline bool check(int p) {
  if (p == -1) return works = false;
  return works = true;
}
int main() {
  int N;
  cin >> N;
  for (int i = (0); i < (N); ++i) cin >> v[i];
  cin >> s;
  s = "$" + s;
  memset(nextSign, 0xff, sizeof(nextSign));
  int L = int((s).size());
  if (L <= 3) {
    printf("no\n");
    return 0;
  }
  nextSign[L - 2][getC(s[L - 1])] = L - 1;
  for (int i = (L - 2) - 1; i >= (0); --i)
    for (int j = (0); j < (40); ++j) {
      nextSign[i][j] = nextSign[i + 1][j];
      nextSign[i][getC(s[i + 1])] = i + 1;
    }
  int p = 0;
  p = nextSign[p][getC('<')];
  check(p);
  if (works == false) {
    printf("no\n");
    return 0;
  }
  p = nextSign[p][getC('3')];
  if (works == false) {
    printf("no\n");
    return 0;
  }
  check(p);
  for (int i = (0); i < (N); ++i) {
    for (int j = (0); j < (int((v[i]).size())); ++j) {
      p = nextSign[p][getC(v[i][j])];
      if (!check(p)) break;
    }
    if (!works) break;
    p = nextSign[p][getC('<')];
    if (!check(p)) break;
    p = nextSign[p][getC('3')];
    if (!check(p)) break;
  }
  if (works)
    printf("yes\n");
  else
    printf("no\n");
  return 0;
}
