#include <bits/stdc++.h>
using namespace std;
const double pi = 3.14159265358979323846;
const double E = 2.7182818284590452354;
const struct _ {
  ios_base::Init i;
  _() {
    srand(time(NULL));
    ios_base::sync_with_stdio(false);
    cin.tie(NULL);
  }
} _;
template <class I>
inline void in(I A, I B) {
  while (A != B) {
    cin >> *A;
    ++A;
  }
}
template <class I>
inline void out(I A, I B, char D = ' ') {
  if (A != B) {
    cout << *A;
    while (++A != B) {
      cout << D << *A;
    }
  }
  cout << '\n';
}
template <class T>
inline T sq(const T& X) {
  return X * X;
}
template <class T>
inline T power(T X, int Y) {
  assert(Y >= 0 && !(X == 0 && Y == 0));
  T R = (Y & 1) ? X : 1;
  while (Y >>= 1) {
    X *= X;
    if (Y & 1) R *= X;
  }
  return R;
}
string arr[100005];
int main() {
  int n;
  cin >> n;
  in(arr, arr + n);
  string a;
  a.reserve(500000);
  for (int i = 0; i < n; i++) {
    a += "<3";
    a += arr[i];
  }
  a += "<3";
  string b;
  cin >> b;
  int j = 0;
  for (int i = 0; i < static_cast<int>((b).size()); i++) {
    if (j < static_cast<int>((a).size()) && a[j] == b[i]) {
      j++;
    }
  }
  cout << (j == static_cast<int>((a).size()) ? "yes" : "no") << '\n';
}
