#include <bits/stdc++.h>
using namespace std;
const long long MOD = 1000000007;
long long POW(long long a, long long b, long long MMM = MOD) {
  long long ret = 1;
  for (; b; b >>= 1, a = (a * a) % MMM)
    if (b & 1) ret = (ret * a) % MMM;
  return ret;
}
long long gcd(long long a, long long b) { return b ? gcd(b, a % b) : a; }
long long lcm(long long a, long long b) {
  if (a == 0 || b == 0) return a + b;
  return a * (b / gcd(a, b));
}
int dx[] = {0, 1, 0, -1}, dy[] = {1, 0, -1, 0};
int ddx[] = {0, 0, 1, 1, 1, -1, -1, -1}, ddy[] = {1, -1, 1, 0, -1, 1, 0, -1};
string s[100000];
int l[100000];
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  int n;
  cin >> n;
  for (int(i) = (0); (i) <= (n - 1); (i) += (1)) {
    cin >> s[i];
    l[i] = s[i].length();
  }
  string S;
  cin >> S;
  int N = S.length();
  int str = -1, te = 0;
  char now = '<';
  for (int(i) = (0); (i) <= (N - 1); (i) += (1)) {
    if (S[i] == now) {
      if (now == '<')
        now = '3';
      else if (now == '3') {
        if (str == n - 1)
          now = '#';
        else {
          te = 0;
          now = s[++str][te];
        }
      } else {
        if (te == l[str] - 1)
          now = '<';
        else
          now = s[str][++te];
      }
    }
  }
  if (now == '#')
    cout << "yes";
  else
    cout << "no";
}
