#include <bits/stdc++.h>
using namespace std;
const long long mod = 1e9 + 7;
const double eps = 1e-5;
const int maxn = 1e5 + 5;
const int inf = 0x3f3f3f3f;
const long long linf = 0x3f3f3f3f3f3f3f3f;
const double PI = acos(-1);
const int Times = 11;
long long qpow_mod(long long a, long long b, long long c) {
  long long ans = 1;
  while (b) {
    if (b & 1) {
      ans *= a;
      ans %= c;
    }
    a *= a;
    a %= c;
    b >>= 1;
  }
  return ans;
}
inline int read() {
  int ret = 0, sgn = 1;
  char ch = getchar();
  while (ch < '0' || ch > '9') {
    if (ch == '-') sgn = -1;
    ch = getchar();
  }
  while (ch >= '0' && ch <= '9') {
    ret = ret * 10 + ch - '0';
    ch = getchar();
  }
  return ret * sgn;
}
long long extended_gcd(long long a, long long b, long long &x, long long &y) {
  long long r, t;
  if (!b) {
    x = 1;
    y = 0;
    return a;
  }
  r = extended_gcd(b, a % b, x, y);
  t = x;
  x = y;
  y = t - a / b * y;
  return r;
}
char t[maxn];
char bs[] = {'<', '3'};
string s[maxn];
int main() {
  int n;
  scanf("%d", &n);
  int r = 0;
  for (int i = 0; i < n; i++) {
    cin >> s[i];
  }
  scanf("%s", t);
  int d = strlen(t);
  if (t[0] != '<' && t[1] != '3') {
    puts("no");
    return 0;
  }
  int pos = 2;
  int flag = 1;
  for (int i = 0; i < n; i++) {
    int a = s[i].size();
    int j = 0;
    while (pos < d && j < a) {
      if (t[pos] == s[i][j]) {
        pos++, j++;
      } else {
        pos++;
      }
    }
    if (j < a) {
      flag = 0;
      break;
    }
    int k = 0;
    while (k < 2 && pos < d) {
      if (t[pos] == bs[k]) {
        pos++, k++;
      } else
        pos++;
    }
    if (k < 2) {
      flag = 0;
      break;
    }
  }
  if (flag)
    puts("yes");
  else
    puts("no");
  return 0;
}
