#include <bits/stdc++.h>
using namespace std;
template <typename T>
inline string toString(T a) {
  ostringstream os("");
  os << a;
  return os.str();
}
template <typename T>
inline long long toLong(T a) {
  long long res;
  istringstream os(a);
  os >> res;
  return res;
}
template <typename T>
inline T S(T a) {
  return a * a;
}
template <typename T>
inline T gcd(T a, T b) {
  if (b == 0)
    return a;
  else
    return gcd(b, a % b);
}
template <typename T>
inline unsigned long long bigmod(T a, T b, T m) {
  if (b == 0)
    return 1;
  else if (b % 2 == 0)
    return S(bigmod(a, b / 2, m)) % m;
  else
    return (a % m * bigmod(a, b - 1, m)) % m;
}
vector<string> v;
vector<int> vv;
int main() {
  int i, j, k;
  string str;
  int n;
  cin >> n;
  for (i = 0; i < n; i++) {
    cin >> str;
    v.push_back(str);
    vv.push_back(str.length());
  }
  cin >> str;
  int len = str.length();
  int st = 0;
  k = 0;
  int res = 0;
  i = 0;
  j = 0;
  for (k = 0; k < len; k++) {
    if (st == 0) {
      if (str[k] == '<') st = 1;
    } else if (st == 1) {
      if (str[k] == '3') st = 2;
    } else if (st == 2) {
      if (str[k] == v[i][j]) {
        j++;
      }
      if (j == vv[i]) {
        i++;
        j = 0;
        st = 0;
      }
    }
    if (i == n && st == 2) {
      res = 1;
      break;
    }
  }
  if (res)
    puts("yes");
  else
    puts("no");
  return 0;
}
