#include <bits/stdc++.h>
using namespace std;
const int nm = 100002;
int n;
string a;
string s, s2;
int main() {
  ios_base::sync_with_stdio(false);
  cin >> n;
  int i;
  s = "<3";
  for (i = 1; i <= n; ++i) {
    cin >> a;
    s = s + a + "<3";
  }
  cin >> s2;
  int j;
  i = j = 0;
  for (; i < s2.length() && j < s.length(); ++i) {
    if (s2[i] == s[j]) j++;
  }
  if (j == s.length())
    cout << "yes";
  else
    cout << "no";
}
