#include <bits/stdc++.h>
const int mod = 1000000007;
const long long INF = 9000000000000000000;
using namespace std;
void solve() {
  long long n;
  cin >> n;
  string s1, hold, s2;
  for (int i = 0; i < n; i++) {
    cin >> hold;
    hold = "<3" + hold;
    s1 += hold;
  }
  s1 += "<3";
  cin >> s2;
  long long cur = 0;
  for (int i = 0; i < s2.length(); i++) {
    if (s2[i] == s1[cur]) {
      cur++;
      if (cur == s1.length()) {
        cout << "yes" << endl;
        return;
      }
    }
  }
  cout << "no" << endl;
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  long long q = 1;
  while (q--) {
    solve();
  }
  return 0;
}
