#include <bits/stdc++.h>
using namespace std;
bool IsSorted(int arr[40], int n) {
  for (int i = 1; i < n; i++)
    if (arr[i - 1] > arr[i]) return false;
  return true;
}
int main() {
  int n;
  string s[100001], text;
  cin >> n;
  for (int i = 0; i < n; i++) cin >> s[i];
  cin >> text;
  int m = 0;
  int j = 0;
  int k = 0;
  int gr = 1, three = 1;
  while (m < text.length()) {
    if (j < n) {
      if (s[j][k] == text[m] && gr == 0 && three == 0) k++;
      if (k == s[j].length()) {
        j++;
        k = 0;
        gr = 1;
        three = 1;
      }
    }
    if (text[m] == '<') gr = 0;
    if (text[m] == '3' && gr == 0) three = 0;
    m++;
  }
  if (j == n && gr == 0 && three == 0)
    cout << "yes" << endl;
  else
    cout << "no" << endl;
  return 0;
}
