#include <bits/stdc++.h>
using namespace std;
int n;
string s[100005], m;
int main() {
  scanf("%d\n", &n);
  for (int i = 0; i < (n); ++i) getline(cin, s[i]);
  getline(cin, m);
  int cnt = 0, state = 0, cnt2 = 0;
  for (int i = 0; i < (m.length()); ++i) {
    if (cnt == n && state == 2) break;
    if (state == 0) {
      if (m[i] == '<') state = 1;
    } else if (state == 1) {
      if (m[i] == '3') state = 2;
    } else {
      if (m[i] == s[cnt][cnt2]) cnt2++;
      if (cnt2 == s[cnt].length()) {
        cnt++;
        cnt2 = 0;
        state = 0;
      }
    }
  }
  if (cnt == n && state == 2)
    printf("yes\n");
  else
    printf("no\n");
  return 0;
}
