#include <bits/stdc++.h>
using namespace std;
void solve() {
  long long int n;
  cin >> n;
  string s = "<3";
  for (int i = 0; i < n; i++) {
    string a;
    cin >> a;
    s += a;
    s += "<3";
  }
  string b;
  cin >> b;
  long long int j = 0;
  for (int i = 0; i < b.size(); i++) {
    if (b[i] == s[j]) j++;
  }
  if (j >= s.size()) {
    cout << "yes";
  } else {
    cout << "no";
  }
  cout << "\n";
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  ;
  solve();
  return 0;
}
