#include <bits/stdc++.h>
using namespace std;
const long long MAX = 2e5 + 10;
int dx[8] = {1, 0, 0, -1, 1, -1, 1, -1};
int dy[8] = {0, 1, -1, 0, 1, -1, -1, 1};
int main() {
  cin.tie(0);
  cout.tie(0);
  std::ios::sync_with_stdio(false);
  string s = "<3";
  int n;
  cin >> n;
  string u;
  while (n--) cin >> u, s += u + "<3";
  string t;
  cin >> t;
  int ret = 0;
  for (int i = 0; i < t.size(); i++) ret += (t[i] == s[ret]);
  if (ret == s.size())
    cout << "yes" << endl;
  else
    cout << "no" << endl;
  return 0;
}
