#include <bits/stdc++.h>
using namespace std;
string Y = "YES\n";
string N = "NO\n";
signed main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  long long t = 1;
  for (long long i = 0; i < t; i++) {
    long long n;
    cin >> n;
    string arr[n];
    for (long long x = 0; x < n; x++) cin >> arr[x];
    string s;
    cin >> s;
    long long ind = 0;
    long long chk1 = 0;
    long long chk2 = 0;
    string ans = "";
    long long j = 0;
    for (long long x = 0; x < s.length(); x++) {
      if (s[x] == '<' && chk1 == 0)
        chk1 = 1;
      else if (s[x] == '3' && chk1 == 1 && chk2 == 0)
        chk2 = 1;
      if (chk1 == 1 && chk2 == 1 && ind < n) {
        if (s[x] == arr[ind][j]) {
          ans += s[x];
          j++;
        }
        if (ans == arr[ind]) {
          ans = "";
          j = 0;
          ind++;
          chk1 = 0;
          chk2 = 0;
        }
      }
    }
    if (ind == n && chk1 == 1 && chk2 == 1)
      cout << "yes" << '\n';
    else
      cout << "no" << '\n';
  }
  return 0;
}
