#include <bits/stdc++.h>
using namespace std;
string A[100002];
int main() {
  int n;
  cin >> n;
  for (int i = 0; i < n; ++i) cin >> A[i];
  char now = '<';
  string message;
  int r = 0, c = 0;
  cin >> message;
  bool complete = 0;
  for (int i = 0; i < message.size(); ++i) {
    if (message[i] == now) {
      if (now == '<') {
        now = '3';
        continue;
      } else if (now == '3') {
        if (r >= n) {
          complete = true;
          continue;
        }
        now = A[r][c];
      } else if (r < n && now == A[r][c]) {
        ++c;
        if (c == A[r].size()) {
          ++r;
          now = '<';
          c = 0;
        } else if (c < A[r].size())
          now = A[r][c];
      }
    }
  }
  if (now == '3' && r == n && c == 0 && complete)
    cout << "yes" << endl;
  else
    cout << "no" << endl;
}
