#include <bits/stdc++.h>
using namespace std;
char temp[100000 + 12];
char str[100000 + 12];
int n;
string word[100000 + 12 * 2];
bool check(char c) {
  if (c >= 'a' && c <= 'z') return true;
  if (c == '<' || c == '>') return true;
  if (c >= '0' && c <= '9') return true;
  return false;
}
int main() {
  scanf("%d", &n);
  getchar();
  word[0] = "<3";
  for (int i = 1; i <= n; i += 1) {
    cin >> word[i];
    word[i] += "<3";
  }
  getchar();
  gets(str);
  int flag;
  int pos = 0;
  for (int k = 0; k <= n; k++) {
    for (int i = 0; word[k][i] != '\0'; i++) {
      flag = 0;
      for (int j = pos; str[j] != '\0'; j++) {
        if (str[j] == word[k][i]) {
          pos = j + 1;
          flag = 1;
          break;
        }
      }
      if (!flag) {
        puts("no");
        return 0;
      }
    }
  }
  puts("yes");
  return 0;
}
