#include <bits/stdc++.h>
using namespace std;
int consume(const string &word, const string &message, int offset) {
  int chars_found = 0;
  auto position = offset;
  while (chars_found < word.size() && position < message.size()) {
    if (word[chars_found] == message[position]) {
      ++chars_found;
    }
    ++position;
  }
  if (chars_found == word.size()) {
    return position;
  }
  return -1;
}
int main() {
  ios_base::sync_with_stdio(false);
  int N;
  cin >> N;
  auto words = vector<string>(N);
  for (int i = 0; i < N; i++) {
    string word;
    cin >> word;
    words[i] = word + "<3";
  }
  string encoded;
  cin >> encoded;
  auto offset = consume("<3", encoded, 0);
  if (offset == -1) {
    cout << "no";
    return 0;
  }
  for (int i = 0; i < N; i++) {
    offset = consume(words[i], encoded, offset);
    if (offset == -1) {
      cout << "no";
      return 0;
    }
  }
  cout << "yes";
  return 0;
}
