#include <bits/stdc++.h>
using namespace std;

int main() {
	ios_base::sync_with_stdio(0);
	cin.tie(0);
	cout.tie(0);

	//	freopen("input.txt", "r", stdin);
	//	freopen("output.txt", "w", stdout);

	int n , temp_index = 0;
	string temp = "" , x , s ;

	cin>>n;

	for(int i=0 ; i<n ; i++){
		temp+="<3";
		cin>>x;
		temp+=x;
	}

	cin>>s;

	for(int i = 0 ; i<(int)s.size() ; i++){
		if(s[i] == temp[temp_index]) temp_index++;
	}

	if(temp_index == (int)temp.size()) cout<<"yes";
	else cout<<"no";
}


#include <bits/stdc++.h>
using namespace std;

int main() {
	ios_base::sync_with_stdio(0);
	cin.tie(0);
	cout.tie(0);

	//	freopen("input.txt", "r", stdin);
	//	freopen("output.txt", "w", stdout);

	int n;
	string temp , x , s , temp1;

	cin>>n;

	for(int i=0 ; i<n ; i++){
		cin>>x;
		temp+=x;
	}

	cin>>s;

	for(int i=0 ; i<(int)s.size() ; i++){
		if(s[i] >= 'a' and s[i] <= 'z') temp1+=s[i];
	}

	if(temp == temp1) cout<<"yes";
	else cout<<"no";
}


#include <bits/stdc++.h>
using namespace std;

int main() {
	ios_base::sync_with_stdio(0);
	cin.tie(0);
	cout.tie(0);

	//	freopen("input.txt", "r", stdin);
	//	freopen("output.txt", "w", stdout);

	int n , temp_index = 0;
	string temp = "" , x , s ;

	cin>>n;

	for(int i=0 ; i<n ; i++){
		temp+="<3";
		cin>>x;
		temp+=x;
	}
	temp+="<3";
	cin>>s;

	for(int i = 0 ; i<(int)s.size() ; i++){
		if(s[i] == temp[temp_index]) temp_index++;
	}

	if(temp_index == (int)temp.size()) cout<<"yes";
	else cout<<"no";
}


#include <bits/stdc++.h>
using namespace std;

int main() {
	ios_base::sync_with_stdio(0);
	cin.tie(0);
	cout.tie(0);

	//	freopen("input.txt", "r", stdin);
	//	freopen("output.txt", "w", stdout);

	int n;
	string temp , x , s , temp1;

	cin>>n;

	for(int i=0 ; i<n ; i++){
		cin>>x;
		temp+=x;
	}

	cin>>s;

	for(int i=0 ; i<(int)s.size() ; i++){
		if(s[i] >= 'a' and s[i] <= 'z') temp1+=s[i];
	}

	if(temp == temp1 and s[(int)s.size() - 1] == '3' and s[(int)s.size() - 2] == '<' and s[0] == '<' and s[1] == '3') cout<<"yes";
	else cout<<"no";
}


#include <bits/stdc++.h>
#define ll long long
#define pii pair<int,int>
#define piii pair<int,pii>
#define pll pair<ll,ll>
#define plii pair<ll,pii>
#define vi vector<int>
#define ff first
#define ss second
#define mp make_pair
#define pb push_back
#define mx 100001
#define eps 0.00000000001
#define mod 1000000007
#define pi acos(-1)
#define inf 100000000
#define loop(i,b,n) for(int i=b;i<n;++i)
#define rev_loop(i,b,n) for(int i=b;i>=n;--i)
using namespace std;
int main()
{
    int n;
    cin>>n;
    string v[n],s;
    loop(i,0,n) cin>>v[i];
    cin>>s;
    int f=1,f1,id=0,n1=s.length();
    loop(i,0,n)
    {
        f1=0;
        loop(j,id,n1) if(s[j]=='<') {id=j+1,f1=1;break;}
        if(!f1) {f=0;break;}
        f1=0;
        loop(j,id,n1) if(s[j]=='3') {id=j+1,f1=1;break;}
        if(!f1) {f=0;break;}
        loop(j,0,v[i].length())
        {
            f1=0;
            loop(k,id,n1) if(s[k]==v[i][j]) {id=j+1,f1=1;break;}
            if(!f1) {f=0;break;}
        }
        if(!f) break;
    }
    if(f)
    {
        f1=0;
        loop(j,id,n1) if(s[j]=='<') {id=j+1,f1=1;break;}
        if(!f1) {f=0;}
        if(f)
        {
            f1=0;
            loop(j,id,n1) if(s[j]=='3') {id=j+1,f1=1;break;}
            if(!f1) {f=0;}
        }
        if(f) cout<<"yes\n";
        else cout<<"no\n";
    }
    else cout<<"no\n";
    return 0;
}


#include <bits/stdc++.h>
#define ll long long
#define pii pair<int,int>
#define piii pair<int,pii>
#define pll pair<ll,ll>
#define plii pair<ll,pii>
#define vi vector<int>
#define ff first
#define ss second
#define mp make_pair
#define pb push_back
#define mx 100001
#define eps 0.00000000001
#define mod 1000000007
#define pi acos(-1)
#define inf 100000000
#define loop(i,b,n) for(int i=b;i<n;++i)
#define rev_loop(i,b,n) for(int i=b;i>=n;--i)
using namespace std;
int main()
{
    int n;
    cin>>n;
    string v[n],s;
    loop(i,0,n) cin>>v[i];
    cin>>s;
    int f=1,f1,id=0,n1=s.length();
    loop(i,0,n)
    {
        f1=0;
        loop(j,id,n1) if(s[j]=='<') {id=j+1,f1=1;break;}
        if(!f1) {f=0;break;}
        f1=0;
        loop(j,id,n1) if(s[j]=='3') {id=j+1,f1=1;break;}
        if(!f1) {f=0;break;}
        loop(j,0,v[i].length())
        {
            f1=0;
            loop(k,id,n1) if(s[k]==v[i][j]) {id=k+1,f1=1;break;}
            if(!f1) {f=0;break;}
        }
        if(!f) break;
    }
    if(f)
    {
        f1=0;
        loop(j,id,n1) if(s[j]=='<') {id=j+1,f1=1;break;}
        if(!f1) {f=0;}
        if(f)
        {
            f1=0;
            loop(j,id,n1) if(s[j]=='3') {id=j+1,f1=1;break;}
            if(!f1) {f=0;}
        }
        if(f) cout<<"yes\n";
        else cout<<"no\n";
    }
    else cout<<"no\n";
    return 0;
}


#pragma GCC optimize ("O3")
#include <bits/stdc++.h>
#define oo 1e6
#define ll long long
#define ld long double
#define IO ios_base::sync_with_stdio(0),cin.tie(0),cout.tie(0);
using namespace std;
const int N = 2e5 + 5, M = 5 * N + 5;

int main(){
    IO;
    int n;
    cin >> n;
    string here;
    for(int i = 0 ; i < n ; ++i){
        string s;
        cin >> s;
        s = "<3" + s;
        here += s;
    }
    here += "<3";
    string tar;
    cin >> tar;
    swap(tar, here);
    int sz = tar.size();
    int sz2 = here.size();
    int i = 0, j = 0;
    for(; i < sz && j < sz2; i += (j++ < sz2))
        while(j < sz2 && tar[i] != here[j])++j;
    puts(i == sz ? "yes" : "no");
}


#pragma GCC optimize ("O3")
#include <bits/stdc++.h>
#define oo 1e6
#define ll long long
#define ld long double
#define IO ios_base::sync_with_stdio(0),cin.tie(0),cout.tie(0);
using namespace std;
const int N = 2e5 + 5, M = 5 * N + 5;

int main(){
    IO;
    int n;
    cin >> n;
    string here;
    for(int i = 0 ; i < n ; ++i){
        string s;
        cin >> s;
        s = "<3" + s;
        here += s;
    }
    here += "<3";
    string tar;
    cin >> tar;
    swap(tar, here);
    int sz = tar.size();
    int sz2 = here.size();
    int i = 0, j = 0;
    for(; i < sz && j < sz2; i += (j < sz2))
        while(j < sz2 && tar[i] != here[j])++j;
    puts(i == sz ? "yes" : "no");
}


#pragma GCC optimize ("O3")
#include <bits/stdc++.h>
#define oo 1e6
#define ll long long
#define ld long double
#define IO ios_base::sync_with_stdio(0),cin.tie(0),cout.tie(0);
using namespace std;
const int N = 2e5 + 5, M = 5 * N + 5;

int main(){
    IO;
    int n;
    cin >> n;
    string here;
    for(int i = 0 ; i < n ; ++i){
        string s;
        cin >> s;
        s = "<3" + s;
        here += s;
    }
    here += "<3";
    string tar;
    cin >> tar;
    swap(tar, here);
    int sz = tar.size();
    int sz2 = here.size();
    int i = 0, j = 0;
    for(; i < sz && j < sz2; ++i)
        while(j < sz2 && tar[i] != here[j])++j;
    puts(i == sz ? "yes" : "no");
}


#pragma GCC optimize ("O3")
#include <bits/stdc++.h>
#define oo 1e6
#define ll long long
#define ld long double
#define IO ios_base::sync_with_stdio(0),cin.tie(0),cout.tie(0);
using namespace std;
const int N = 2e5 + 5, M = 5 * N + 5;

int main(){
    IO;
    int n;
    cin >> n;
    string here;
    for(int i = 0 ; i < n ; ++i){
        string s;
        cin >> s;
        s = "<3" + s;
        here += s;
    }
    here += "<3";
    string tar;
    cin >> tar;
    cout << tar << "\n" << here << endl;
    swap(tar, here);
    int sz = tar.size();
    int sz2 = here.size();
    int i = 0, j = 0;
    for(; i < sz && j < sz2; i += (j < sz2))
        while(j < sz2 && tar[i] != here[j])++j;
    puts(i == sz ? "yes" : "no");
}


#pragma GCC optimize ("O3")
#include <bits/stdc++.h>
#define oo 1e6
#define ll long long
#define ld long double
#define IO ios_base::sync_with_stdio(0),cin.tie(0),cout.tie(0);
using namespace std;
const int N = 2e5 + 5, M = 5 * N + 5;

int main(){
    IO;
    int n;
    cin >> n;
    string here;
    for(int i = 0 ; i < n ; ++i){
        string s;
        cin >> s;
        s = "<3" + s;
        here += s;
    }
    here += "<3";
    string tar;
    cin >> tar;
    swap(tar, here);
    int sz = tar.size();
    int sz2 = here.size();
    int i = 0, j = 0;
    for(; i < sz && j < sz2; ++i){
        while(j < sz2 && tar[i] != here[j])++j;
        if(j == sz2)break;
    }
    puts(i == sz ? "yes" : "no");
}


#include<bits/stdc++.h>
#include<ext/pb_ds/assoc_container.hpp>
#include<ext/pb_ds/tree_policy.hpp>
#define reduce200ms ios_base::sync_with_stdio(0),cin.tie(0),cout.tie(0)
#define dofloat cout<<fixed<<setprecision(6)
#define pb push_back
#define mp make_pair
#define x first
#define y second
#define bitcount _builtin_popcount
#define fill(var,val) memset(var,val, sizeof var)
#define rep(i,a,b) for(auto i=a;i<b;++i)
#define per(i,a,b) for(auto i=a;i>b;--i)
#define elif else if
#define all(vec) vec.begin(),vec.end()
#define rall(vec) vec.rbegin(),vec.rend()
/*
    #ifdef DEBUG
         #define debug(args...)            {dbg,args; cerr<<endl;}
    #else
        #define debug(args...)
    #endif
    struct debugger
    {
        template<typename T> debugger& operator , (const T& v)
        {
            cerr<<v<<" ";
            return *this;
        }
    } dbg;
*/
using namespace __gnu_pbds;
using namespace std;

typedef long long ll;
typedef long double ld;
typedef vector<long long> vl;
typedef pair<long long,long long> pll;
typedef vector<pair<long long,long long> > vll;

const long long MOD=1000000007;
const long long MAX=100005;
const long double PI=3.14159265359;
const long double G=9.807;
const long long INF=1e18;
const long double EPS=1e-6;

long long gcd(long long a,long long b){return b?gcd(b,a%b):a;}
long double dist(long long a,long long b,long long c,long long d){return sqrt( ((a)-(c))*((a)-(c))+((b)-(d))*((b)-(d)) );}
long long min(long long a,long long b,long long c){return min(c,min(a,b));}
long long max(long long a,long long b,long long c){return max(c,max(a,b));}
bool isprime(long long a){
if(a==2)return 1;
if(!(a&1))return 0;
for(ll i=3;i*i<=a;i+=2){
	if(a%i==0)return 0;
}
return 1;
}
long long mpow(long long base,long long exponent,long long modulus){
if(modulus==1)return 0;
long long result = 1;
base=base%modulus;
while(exponent){
		if(exponent%2 == 1)
			result=(result*base)%modulus;
		exponent=exponent>>1;
		base=(base*base)%modulus;
	}
return result;
}
/*template <typename T>
using ordered_set = tree<T, null_type, less<T>, rb_tree_tag, tree_order_statistics_node_update>;*/

int main(){reduce200ms;
ll n;cin>>n;
vector<string>ss;
rep(i,0,n){
	string t;cin>>t;
	ss.pb(t);
}
string dima;cin>>dima;
string inna;
/*
rep(i,0,dima.length()){
	if(isalpha(dima[i]))inna.pb(dima[i]);
}
ll clen=0;
rep(i,0,n)clen+=ss[i].length();
if(inna.length()!=clen){
	cout<<"no";
	return 0;
}
rep(i,0,n){
	auto found=inna.find(ss[i]);
	if(found==string::npos){
		cout<<"no";
		return 0;
	}
}
cout<<"yes";*/
rep(i,0,dima.length()){
	if(dima[i]=='<'){
		while(i<dima.length() and dima[i]!='3'){
			i++;
			if(isalpha(dima[i]))inna.pb(dima[i]);
		}
	}
	elif(isalpha(dima[i]))inna.pb(dima[i]);
}
ll clen=0;
rep(i,0,n)clen+=ss[i].length();
if(inna.length()!=clen){
	cout<<"no";
	return 0;
}
rep(i,0,n){
	auto found=inna.find(ss[i]);
	if(found==string::npos){
		cout<<"no";
		return 0;
	}
}
cout<<"yes";
return 0;
}


#include<bits/stdc++.h>
#include<ext/pb_ds/assoc_container.hpp>
#include<ext/pb_ds/tree_policy.hpp>
#define reduce200ms ios_base::sync_with_stdio(0),cin.tie(0),cout.tie(0)
#define dofloat cout<<fixed<<setprecision(6)
#define pb push_back
#define mp make_pair
#define x first
#define y second
#define bitcount _builtin_popcount
#define fill(var,val) memset(var,val, sizeof var)
#define rep(i,a,b) for(auto i=a;i<b;++i)
#define per(i,a,b) for(auto i=a;i>b;--i)
#define elif else if
#define all(vec) vec.begin(),vec.end()
#define rall(vec) vec.rbegin(),vec.rend()
/*
    #ifdef DEBUG
         #define debug(args...)            {dbg,args; cerr<<endl;}
    #else
        #define debug(args...)
    #endif
    struct debugger
    {
        template<typename T> debugger& operator , (const T& v)
        {
            cerr<<v<<" ";
            return *this;
        }
    } dbg;
*/
using namespace __gnu_pbds;
using namespace std;

typedef long long ll;
typedef long double ld;
typedef vector<long long> vl;
typedef pair<long long,long long> pll;
typedef vector<pair<long long,long long> > vll;

const long long MOD=1000000007;
const long long MAX=100005;
const long double PI=3.14159265359;
const long double G=9.807;
const long long INF=1e18;
const long double EPS=1e-6;

long long gcd(long long a,long long b){return b?gcd(b,a%b):a;}
long double dist(long long a,long long b,long long c,long long d){return sqrt( ((a)-(c))*((a)-(c))+((b)-(d))*((b)-(d)) );}
long long min(long long a,long long b,long long c){return min(c,min(a,b));}
long long max(long long a,long long b,long long c){return max(c,max(a,b));}
bool isprime(long long a){
if(a==2)return 1;
if(!(a&1))return 0;
for(ll i=3;i*i<=a;i+=2){
	if(a%i==0)return 0;
}
return 1;
}
long long mpow(long long base,long long exponent,long long modulus){
if(modulus==1)return 0;
long long result = 1;
base=base%modulus;
while(exponent){
		if(exponent%2 == 1)
			result=(result*base)%modulus;
		exponent=exponent>>1;
		base=(base*base)%modulus;
	}
return result;
}
/*template <typename T>
using ordered_set = tree<T, null_type, less<T>, rb_tree_tag, tree_order_statistics_node_update>;*/

int main(){reduce200ms;
ll n;cin>>n;
string bigs="";
rep(i,0,n){
	string t;cin>>t;
	bigs+=t;
}
string dima;cin>>dima;
string inna;
/*
rep(i,0,dima.length()){
	if(isalpha(dima[i]))inna.pb(dima[i]);
}
ll clen=0;
rep(i,0,n)clen+=ss[i].length();
if(inna.length()!=clen){
	cout<<"no";
	return 0;
}
rep(i,0,n){
	auto found=inna.find(ss[i]);
	if(found==string::npos){
		cout<<"no";
		return 0;
	}
}
cout<<"yes";*/
string decode;
rep(i,0,dima.length()){
	if(dima[i]>='0' and dima[i]<='9' and dima[i]!='3');
	elif(dima[i]=='>');
	else decode.pb(dima[i]);
}
//cout<<decode<<'\n';
auto lo=decode.find("<3");
while(true){
	if(lo==string::npos)break;
	auto hi=decode.find("<3",lo+1);
	//cout<<lo<<' '<<hi<<'\n';
	if(hi==string::npos)break;
	rep(i,lo,hi){
		if(isalpha(decode[i]))inna.pb(decode[i]);
	}
	lo=hi;
}
//cout<<inna<<'\n';
if(inna.length()==0){
	cout<<"no";
	return 0;
}
ll i=0,j=0;
while(true){
	if(bigs[j]==inna[i])i++,j++;
	else i++;
	if(i==inna.length() or j==bigs.length())break;
}
if(j==bigs.length())
cout<<"yes";
else cout<<"no";
return 0;
}


#include<bits/stdc++.h>
#include<ext/pb_ds/assoc_container.hpp>
#include<ext/pb_ds/tree_policy.hpp>
#define reduce200ms ios_base::sync_with_stdio(0),cin.tie(0),cout.tie(0)
#define dofloat cout<<fixed<<setprecision(6)
#define pb push_back
#define mp make_pair
#define x first
#define y second
#define bitcount _builtin_popcount
#define fill(var,val) memset(var,val, sizeof var)
#define rep(i,a,b) for(auto i=a;i<b;++i)
#define per(i,a,b) for(auto i=a;i>b;--i)
#define elif else if
#define all(vec) vec.begin(),vec.end()
#define rall(vec) vec.rbegin(),vec.rend()
/*
    #ifdef DEBUG
         #define debug(args...)            {dbg,args; cerr<<endl;}
    #else
        #define debug(args...)
    #endif
    struct debugger
    {
        template<typename T> debugger& operator , (const T& v)
        {
            cerr<<v<<" ";
            return *this;
        }
    } dbg;
*/
using namespace __gnu_pbds;
using namespace std;

typedef long long ll;
typedef long double ld;
typedef vector<long long> vl;
typedef pair<long long,long long> pll;
typedef vector<pair<long long,long long> > vll;

const long long MOD=1000000007;
const long long MAX=100005;
const long double PI=3.14159265359;
const long double G=9.807;
const long long INF=1e18;
const long double EPS=1e-6;

long long gcd(long long a,long long b){return b?gcd(b,a%b):a;}
long double dist(long long a,long long b,long long c,long long d){return sqrt( ((a)-(c))*((a)-(c))+((b)-(d))*((b)-(d)) );}
long long min(long long a,long long b,long long c){return min(c,min(a,b));}
long long max(long long a,long long b,long long c){return max(c,max(a,b));}
bool isprime(long long a){
if(a==2)return 1;
if(!(a&1))return 0;
for(ll i=3;i*i<=a;i+=2){
	if(a%i==0)return 0;
}
return 1;
}
long long mpow(long long base,long long exponent,long long modulus){
if(modulus==1)return 0;
long long result = 1;
base=base%modulus;
while(exponent){
		if(exponent%2 == 1)
			result=(result*base)%modulus;
		exponent=exponent>>1;
		base=(base*base)%modulus;
	}
return result;
}
/*template <typename T>
using ordered_set = tree<T, null_type, less<T>, rb_tree_tag, tree_order_statistics_node_update>;*/

int main(){reduce200ms;
ll n;cin>>n;
vector<string>ss;
rep(i,0,n){
	string t;cin>>t;
	ss.pb(t);
}
string dima;cin>>dima;
string inna;
rep(i,0,dima.length()){
	if(isalpha(dima[i]))inna.pb(dima[i]);
}
ll clen=0;
rep(i,0,n)clen+=ss[i].length();
if(inna.length()!=clen){
	cout<<"no";
	return 0;
}
rep(i,0,n){
	auto found=inna.find(ss[i]);
	if(found==string::npos){
		cout<<"no";
		return 0;
	}
}
cout<<"yes";
return 0;
}


#include<bits/stdc++.h>
#include<ext/pb_ds/assoc_container.hpp>
#include<ext/pb_ds/tree_policy.hpp>
#define reduce200ms ios_base::sync_with_stdio(0),cin.tie(0),cout.tie(0)
#define dofloat cout<<fixed<<setprecision(6)
#define pb push_back
#define mp make_pair
#define x first
#define y second
#define bitcount _builtin_popcount
#define fill(var,val) memset(var,val, sizeof var)
#define rep(i,a,b) for(auto i=a;i<b;++i)
#define per(i,a,b) for(auto i=a;i>b;--i)
#define elif else if
#define all(vec) vec.begin(),vec.end()
#define rall(vec) vec.rbegin(),vec.rend()
/*
    #ifdef DEBUG
         #define debug(args...)            {dbg,args; cerr<<endl;}
    #else
        #define debug(args...)
    #endif
    struct debugger
    {
        template<typename T> debugger& operator , (const T& v)
        {
            cerr<<v<<" ";
            return *this;
        }
    } dbg;
*/
using namespace __gnu_pbds;
using namespace std;

typedef long long ll;
typedef long double ld;
typedef vector<long long> vl;
typedef pair<long long,long long> pll;
typedef vector<pair<long long,long long> > vll;

const long long MOD=1000000007;
const long long MAX=100005;
const long double PI=3.14159265359;
const long double G=9.807;
const long long INF=1e18;
const long double EPS=1e-6;

long long gcd(long long a,long long b){return b?gcd(b,a%b):a;}
long double dist(long long a,long long b,long long c,long long d){return sqrt( ((a)-(c))*((a)-(c))+((b)-(d))*((b)-(d)) );}
long long min(long long a,long long b,long long c){return min(c,min(a,b));}
long long max(long long a,long long b,long long c){return max(c,max(a,b));}
bool isprime(long long a){
if(a==2)return 1;
if(!(a&1))return 0;
for(ll i=3;i*i<=a;i+=2){
	if(a%i==0)return 0;
}
return 1;
}
long long mpow(long long base,long long exponent,long long modulus){
if(modulus==1)return 0;
long long result = 1;
base=base%modulus;
while(exponent){
		if(exponent%2 == 1)
			result=(result*base)%modulus;
		exponent=exponent>>1;
		base=(base*base)%modulus;
	}
return result;
}
/*template <typename T>
using ordered_set = tree<T, null_type, less<T>, rb_tree_tag, tree_order_statistics_node_update>;*/

int main(){reduce200ms;
ll n;cin>>n;
string bigs="<3";
rep(i,0,n){
	string t;cin>>t;
	bigs+=(t+"<3");
}
string dima;cin>>dima;
string inna;
/*
rep(i,0,dima.length()){
	if(isalpha(dima[i]))inna.pb(dima[i]);
}
ll clen=0;
rep(i,0,n)clen+=ss[i].length();
if(inna.length()!=clen){
	cout<<"no";
	return 0;
}
rep(i,0,n){
	auto found=inna.find(ss[i]);
	if(found==string::npos){
		cout<<"no";
		return 0;
	}
}
cout<<"yes";*/
string decode;
rep(i,0,dima.length()){
	if(dima[i]>='0' and dima[i]<='9' and dima[i]!='3');
	elif(dima[i]=='>');
	else decode.pb(dima[i]);
}
inna=decode;
//cout<<decode<<'\n';

/*auto lo=decode.find("<3");

while(true){
	if(lo==string::npos)break;
	auto hi=decode.find("<3",lo+1);
	//cout<<lo<<' '<<hi<<'\n';
	if(hi==string::npos)break;
	rep(i,lo,hi){
		if(isalpha(decode[i]))inna.pb(decode[i]);
	}
	lo=hi;
}*/
//cout<<inna<<'\n';
if(inna.length()==0){
	cout<<"no";
	return 0;
}
ll i=0,j=0;
//cout<<bigs<<' ';
while(true){
	if(bigs[j]==inna[i])i++,j++;
	else i++;
	if(i==inna.length() or j==bigs.length())break;
}
if(j==bigs.length())
cout<<"yes";
else cout<<"no";
return 0;
}


#include<bits/stdc++.h>
#include<ext/pb_ds/assoc_container.hpp>
#include<ext/pb_ds/tree_policy.hpp>
#define reduce200ms ios_base::sync_with_stdio(0),cin.tie(0),cout.tie(0)
#define dofloat cout<<fixed<<setprecision(6)
#define pb push_back
#define mp make_pair
#define x first
#define y second
#define bitcount _builtin_popcount
#define fill(var,val) memset(var,val, sizeof var)
#define rep(i,a,b) for(auto i=a;i<b;++i)
#define per(i,a,b) for(auto i=a;i>b;--i)
#define elif else if
#define all(vec) vec.begin(),vec.end()
#define rall(vec) vec.rbegin(),vec.rend()
/*
    #ifdef DEBUG
         #define debug(args...)            {dbg,args; cerr<<endl;}
    #else
        #define debug(args...)
    #endif
    struct debugger
    {
        template<typename T> debugger& operator , (const T& v)
        {
            cerr<<v<<" ";
            return *this;
        }
    } dbg;
*/
using namespace __gnu_pbds;
using namespace std;

typedef long long ll;
typedef long double ld;
typedef vector<long long> vl;
typedef pair<long long,long long> pll;
typedef vector<pair<long long,long long> > vll;

const long long MOD=1000000007;
const long long MAX=100005;
const long double PI=3.14159265359;
const long double G=9.807;
const long long INF=1e18;
const long double EPS=1e-6;

long long gcd(long long a,long long b){return b?gcd(b,a%b):a;}
long double dist(long long a,long long b,long long c,long long d){return sqrt( ((a)-(c))*((a)-(c))+((b)-(d))*((b)-(d)) );}
long long min(long long a,long long b,long long c){return min(c,min(a,b));}
long long max(long long a,long long b,long long c){return max(c,max(a,b));}
bool isprime(long long a){
if(a==2)return 1;
if(!(a&1))return 0;
for(ll i=3;i*i<=a;i+=2){
	if(a%i==0)return 0;
}
return 1;
}
long long mpow(long long base,long long exponent,long long modulus){
if(modulus==1)return 0;
long long result = 1;
base=base%modulus;
while(exponent){
		if(exponent%2 == 1)
			result=(result*base)%modulus;
		exponent=exponent>>1;
		base=(base*base)%modulus;
	}
return result;
}
/*template <typename T>
using ordered_set = tree<T, null_type, less<T>, rb_tree_tag, tree_order_statistics_node_update>;*/

int main(){reduce200ms;
ll n;cin>>n;
vector<string>ss;
rep(i,0,n){
	string t;cin>>t;
	ss.pb(t);
}
string dima;cin>>dima;
string inna;
/*
rep(i,0,dima.length()){
	if(isalpha(dima[i]))inna.pb(dima[i]);
}
ll clen=0;
rep(i,0,n)clen+=ss[i].length();
if(inna.length()!=clen){
	cout<<"no";
	return 0;
}
rep(i,0,n){
	auto found=inna.find(ss[i]);
	if(found==string::npos){
		cout<<"no";
		return 0;
	}
}
cout<<"yes";*/
rep(i,0,dima.length()){
	if(dima[i]=='<'){
		while(i<dima.length() and dima[i]!='3')i++;
	}
	elif(isalpha(dima[i]))inna.pb(dima[i]);
}
ll clen=0;
rep(i,0,n)clen+=ss[i].length();
if(inna.length()!=clen){
	cout<<"no";
	return 0;
}
rep(i,0,n){
	auto found=inna.find(ss[i]);
	if(found==string::npos){
		cout<<"no";
		return 0;
	}
}
cout<<"yes";
return 0;
}


#include<bits/stdc++.h>
#include<ext/pb_ds/assoc_container.hpp>
#include<ext/pb_ds/tree_policy.hpp>
#define reduce200ms ios_base::sync_with_stdio(0),cin.tie(0),cout.tie(0)
#define dofloat cout<<fixed<<setprecision(6)
#define pb push_back
#define mp make_pair
#define x first
#define y second
#define bitcount _builtin_popcount
#define fill(var,val) memset(var,val, sizeof var)
#define rep(i,a,b) for(auto i=a;i<b;++i)
#define per(i,a,b) for(auto i=a;i>b;--i)
#define elif else if
#define all(vec) vec.begin(),vec.end()
#define rall(vec) vec.rbegin(),vec.rend()
/*
    #ifdef DEBUG
         #define debug(args...)            {dbg,args; cerr<<endl;}
    #else
        #define debug(args...)
    #endif
    struct debugger
    {
        template<typename T> debugger& operator , (const T& v)
        {
            cerr<<v<<" ";
            return *this;
        }
    } dbg;
*/
using namespace __gnu_pbds;
using namespace std;

typedef long long ll;
typedef long double ld;
typedef vector<long long> vl;
typedef pair<long long,long long> pll;
typedef vector<pair<long long,long long> > vll;

const long long MOD=1000000007;
const long long MAX=100005;
const long double PI=3.14159265359;
const long double G=9.807;
const long long INF=1e18;
const long double EPS=1e-6;

long long gcd(long long a,long long b){return b?gcd(b,a%b):a;}
long double dist(long long a,long long b,long long c,long long d){return sqrt( ((a)-(c))*((a)-(c))+((b)-(d))*((b)-(d)) );}
long long min(long long a,long long b,long long c){return min(c,min(a,b));}
long long max(long long a,long long b,long long c){return max(c,max(a,b));}
bool isprime(long long a){
if(a==2)return 1;
if(!(a&1))return 0;
for(ll i=3;i*i<=a;i+=2){
	if(a%i==0)return 0;
}
return 1;
}
long long mpow(long long base,long long exponent,long long modulus){
if(modulus==1)return 0;
long long result = 1;
base=base%modulus;
while(exponent){
		if(exponent%2 == 1)
			result=(result*base)%modulus;
		exponent=exponent>>1;
		base=(base*base)%modulus;
	}
return result;
}
/*template <typename T>
using ordered_set = tree<T, null_type, less<T>, rb_tree_tag, tree_order_statistics_node_update>;*/

int main(){reduce200ms;
ll n;cin>>n;
vector<string>ss;
rep(i,0,n){
	string t;cin>>t;
	ss.pb(t);
}
string dima;cin>>dima;
string inna;
/*
rep(i,0,dima.length()){
	if(isalpha(dima[i]))inna.pb(dima[i]);
}
ll clen=0;
rep(i,0,n)clen+=ss[i].length();
if(inna.length()!=clen){
	cout<<"no";
	return 0;
}
rep(i,0,n){
	auto found=inna.find(ss[i]);
	if(found==string::npos){
		cout<<"no";
		return 0;
	}
}
cout<<"yes";*/
string decode;
rep(i,0,dima.length()){
	if(dima[i]>='0' and dima[i]<='9' and dima[i]!='3');
	elif(dima[i]=='>');
	else decode.pb(dima[i]);
}
//cout<<decode<<'\n';
auto lo=decode.find("<3");
rep(i,0,decode.length()){
	if(lo==string::npos)break;
	auto hi=decode.find("<3",lo+1);
	//cout<<lo<<' '<<hi<<'\n';
	if(hi==string::npos)break;
	rep(i,lo+2,hi){
		if(isalpha(decode[i]))inna.pb(decode[i]);
	}
	lo=hi;
}
//cout<<inna<<'\n';
rep(i,0,n){
	auto check=inna.find(ss[i]);
	if(check==string::npos){
		cout<<"no";
		return 0;
	}
}
cout<<"yes";
return 0;
}


#include<bits/stdc++.h>
#include<ext/pb_ds/assoc_container.hpp>
#include<ext/pb_ds/tree_policy.hpp>
#define reduce200ms ios_base::sync_with_stdio(0),cin.tie(0),cout.tie(0)
#define dofloat cout<<fixed<<setprecision(6)
#define pb push_back
#define mp make_pair
#define x first
#define y second
#define bitcount _builtin_popcount
#define fill(var,val) memset(var,val, sizeof var)
#define rep(i,a,b) for(auto i=a;i<b;++i)
#define per(i,a,b) for(auto i=a;i>b;--i)
#define elif else if
#define all(vec) vec.begin(),vec.end()
#define rall(vec) vec.rbegin(),vec.rend()
/*
    #ifdef DEBUG
         #define debug(args...)            {dbg,args; cerr<<endl;}
    #else
        #define debug(args...)
    #endif
    struct debugger
    {
        template<typename T> debugger& operator , (const T& v)
        {
            cerr<<v<<" ";
            return *this;
        }
    } dbg;
*/
using namespace __gnu_pbds;
using namespace std;

typedef long long ll;
typedef long double ld;
typedef vector<long long> vl;
typedef pair<long long,long long> pll;
typedef vector<pair<long long,long long> > vll;

const long long MOD=1000000007;
const long long MAX=100005;
const long double PI=3.14159265359;
const long double G=9.807;
const long long INF=1e18;
const long double EPS=1e-6;

long long gcd(long long a,long long b){return b?gcd(b,a%b):a;}
long double dist(long long a,long long b,long long c,long long d){return sqrt( ((a)-(c))*((a)-(c))+((b)-(d))*((b)-(d)) );}
long long min(long long a,long long b,long long c){return min(c,min(a,b));}
long long max(long long a,long long b,long long c){return max(c,max(a,b));}
bool isprime(long long a){
if(a==2)return 1;
if(!(a&1))return 0;
for(ll i=3;i*i<=a;i+=2){
	if(a%i==0)return 0;
}
return 1;
}
long long mpow(long long base,long long exponent,long long modulus){
if(modulus==1)return 0;
long long result = 1;
base=base%modulus;
while(exponent){
		if(exponent%2 == 1)
			result=(result*base)%modulus;
		exponent=exponent>>1;
		base=(base*base)%modulus;
	}
return result;
}
/*template <typename T>
using ordered_set = tree<T, null_type, less<T>, rb_tree_tag, tree_order_statistics_node_update>;*/

int main(){reduce200ms;
ll n;cin>>n;
vector<string>ss;
rep(i,0,n){
	string t;cin>>t;
	ss.pb(t);
}
string dima;cin>>dima;
string inna;
/*
rep(i,0,dima.length()){
	if(isalpha(dima[i]))inna.pb(dima[i]);
}
ll clen=0;
rep(i,0,n)clen+=ss[i].length();
if(inna.length()!=clen){
	cout<<"no";
	return 0;
}
rep(i,0,n){
	auto found=inna.find(ss[i]);
	if(found==string::npos){
		cout<<"no";
		return 0;
	}
}
cout<<"yes";*/
string decode;
rep(i,0,dima.length()){
	if(dima[i]>='0' and dima[i]<='9' and dima[i]!='3');
	elif(dima[i]=='>');
	else decode.pb(dima[i]);
}
//cout<<decode<<'\n';
auto lo=decode.find("<3");
while(true){
	if(lo==string::npos)break;
	auto hi=decode.find("<3",lo+1);
	//cout<<lo<<' '<<hi<<'\n';
	if(hi==string::npos)break;
	rep(i,lo,hi){
		if(isalpha(decode[i]))inna.pb(decode[i]);
	}
	lo=hi;
}
//cout<<inna<<'\n';
rep(i,0,n){
	auto check=inna.find(ss[i]);
	if(check==string::npos){
		cout<<"no";
		return 0;
	}
}
cout<<"yes";
return 0;
}


#include <bits/stdc++.h>

using namespace std;

int main()
{
    int n;
    cin>>n;
    string s,c;
    for (int i=0;i<n;i++){
        cin>>s;
        c+="<3"+s;
    }
    c+="<3";
    cin>>s;
    bool check;
    int ind=0;
    for (int i=0;i<c.size();i++){
        check=false;
        for (int j=ind;j<s.size();j++){
            if (c[i]==s[j]){
                ind=j+1;
                check=true;
                break;
            }
        }
        if (!check){
            cout<<"no";
            return 0;
        }
    }
    cout<<"yes";

    return 0;
}


#include <bits/stdc++.h>

using namespace std;

int main()
{
    int n;
    cin>>n;
    string s,c;
    for (int i=0;i<n;i++){
        cin>>s;
        c+="<3"+s;
    }
    c+="<3";
    cin>>s;
    bool check,ind=0;
    for (int i=0;i<c.size();i++){
        check=false;
        for (int j=ind;j<s.size();j++){
            if (c[i]==s[j]){
                ind=j+1;
                check=true;
                break;
            }
        }
        if (!check){
            cout<<"no";
            return 0;
        }
    }
    cout<<"yes";

    return 0;
}


#include<bits/stdc++.h>
using namespace std ;

vector<string> ans;
int main()
{
    string s;
    long n,k;
    cin>>n;
    for(int i=0;i<n;i++)
    {

        cin>>s;
       ans.push_back(s);
    }
    cin>>s;
   // n=ans.size();
    k=s.size();
    long j=0;
    for(int i=0;i<n;i++)
    {
        while(j<k && s[j]!='<')
        {
            j++;
        }
        j++;
        while(j<k && s[j]!='3')j++;
        j++;

        for(int o=0;o<ans[i].size();o++)
        {
            while(j<k && ans[i][o]!=s[j])j++;
            j++;
        }
         if(j>k){cout<<"no";return 0;}
    }
     while(j<k && s[j]!='<')
        {
            j++;
        }
        j++;
        while(j<k && s[j]!='3')j++;
        j++;
         if(j>k){cout<<"no";return 0;}
cout<<"yes";
}


#include<bits/stdc++.h>
using namespace std ;

vector<string> ans;
int main()
{
    string s;
    long n,k;
    cin>>n;
    for(int i=0;i<n;i++)
    {

        cin>>s;
       ans.push_back(s);
    }
    cin>>s;
   // n=ans.size();
    k=s.size();
    long j=0;
    for(int i=0;i<n;i++)
    {
        while(j<k && s[j]!='<')
        {
            j++;
        }
        j++;
        while(j<k && s[j]!='3')j++;
        j++;

        for(int o=0;o<ans[i].size();o++)
        {
            while(j<k && ans[i][o]!=s[j])j++;
            j++;
        }
         if(j>k){cout<<"no";return 0;}
    }
cout<<"yes";
}


#include<bits/stdc++.h>
#define PI 3.141592653589793238462
using namespace std;
typedef long long ll;
typedef long double db;
typedef pair<int,int> pii;
typedef pair<ll,ll> pll;
typedef pair<db,db> pdd;
string x[100005];
vector<int> num;
vector<pii> b;
int main(){
    int n;cin>>n;
    string p="<3",t="",s;
    for(int i=1;i<=n;i++){
        cin>>x[i];
        p+=x[i];p+="<3";
    }cin>>s;int now=0;
    for(int i=0;i<s.length();i++){
        if(now<p.length()&&s[i]==p[now]) now++;
    }
    if(now==p.length()){
        cout<<"yes"<<endl;return 0;
    }
    else cout<<"no"<<endl;
}


#include<bits/stdc++.h>
#define PI 3.141592653589793238462
using namespace std;
typedef long long ll;
typedef long double db;
typedef pair<int,int> pii;
typedef pair<ll,ll> pll;
typedef pair<db,db> pdd;
string x[100005];
vector<int> num;
vector<pii> b;
int main(){
    int n;cin>>n;
    string p="",t="",s;
    for(int i=1;i<=n;i++){
        cin>>x[i];p+=x[i];
    }cin>>s;
    for(int i=0;i<s.length();i++){
        if(s[i]>='a'&&s[i]<='z') t+=s[i],num.push_back(i);
    }
    if(t!=p) {cout<<"no"<<endl;return 0;}
    b.push_back({0,num[0]-1});
    num.push_back(s.length());
    int now=1,last=0;
    for(int i=0;i<num.size()-1;i++){
        if(i+1-last==x[now].length()){
            b.push_back({num[i]+1,num[i+1]-1});
            last+=x[now].length();now++;
        }
    }
    for(auto j:b){
        int v1=0,v2=0;
        for(int i=j.first;i<=j.second;i++){
            if(s[i]=='<') v1++;
            if(s[i]=='3'){
                if(v1) v2++;
            }
        }
        if(v1&&v2) continue;
        else {cout<<"no"<<endl;return 0;}
    }
    cout<<"yes"<<endl;
}


#include<bits/stdc++.h>
using namespace std;

int main()
{
        int n;
        scanf("%d",&n);
        string arr[n];
        for (int i=0;i<n;++i){
            cin>>arr[i];
        }
        string x;
        cin>>x;
        int j=0;
        for (int i=0;i<(int)x.size();++i){
            if (x[i]==arr[j][0]){
                for (int k=0;k<(int)arr[j].size() && i<(int)x.size();++i){
                    if (arr[j][k]==x[i]){
                        k++;
                        if (k==arr[j].size())
                            break;
                    }
                }
                j++;
                if (j==n)
                    break;
            }
        }
        if (j==n)
            cout<<"yes";
        else
            cout<<"no";

    return 0;
}


#include<bits/stdc++.h>
using namespace std;

int main()
{
        int n;
        scanf("%d",&n);
        string res;
        string a;
        res+="<3";
        for (int i=0;i<n;++i){
            cin>>a;
            res+=a;
            res+="<3";
        }

        string x;
        cin>>x;
        int i=0,j=0;
        for (i=0,j;i<(int)x.size() && j<(int)res.size();++i){
                if (x[i]==res[j])
                    j++;
        }
        if (j==res.size())
            cout<<"yes";
        else
            cout<<"no";

    return 0;
}


#include<bits/stdc++.h>
using namespace std;

int main()
{
        int n;
        scanf("%d",&n);
        string arr[n];
        long long total=0;
        for (int i=0;i<n;++i){
            cin>>arr[i];
            total+=arr[i].size();
        }
        string x;
        cin>>x;
        int j=0;
        for (int i=0;i<(int)x.size()-1;++i){
            if (x[i]==arr[j][0]){
                bool flag=true;
                for (int k=0;k<(int)arr[j].size();++k,++i){
                    if (arr[j][k]!=x[i]){

                        flag=false;
                        break;
                    }
                }
                --i;
                if (flag)
                    j++;
            }
        }
        if ((int)x.size() - 2*(n+1) -1 ==total && j==n)
            cout<<"yes";
        else
            cout<<"no";

    return 0;
}


#include <bits/stdc++.h>
#define inf 1000000009
#define ll          long long
#define pb          push_back
#define F           first
#define S           second
#define N  100005
#define PI 3.14159265359
#define hell 1000000007
#define rep(i,a,b) for(i=a;i<b;i++)
#define vi vector<int>
#define vii vector<pair<int,int> >
#define vd vector<double>
#define vdd vector<pair<double,double> >
#define pii pair<int,int>

using namespace std;

int main()
{
    ios_base::sync_with_stdio(false);
    cin.tie(0);
    cout.tie(0);
    ll n,i,j,f,l;
    string arr[N];
    string s,s1="";
    cin>>n;
    rep(i,0,n)
    {
        cin>>arr[i];
        s1=s1+"<3"+arr[i];
    }
    s1=s1+"<3";
    ll l1=s1.length();
    //cout<<"s1  "<<s1<<"\n";
    cin>>s;
    l=s.length();
    if(l<l1)
        cout<<"no";
    else{
            j=0;
    rep(i,0,l)
    {
        if(j==l1)
        break;
       if(s[i]==s1[j])
       {
           ++j;
           //cout<<j<<" ";
       }
    }
    if(j==l1)
        cout<<"yes";
    else
        cout<<"no";
}
}


#include <bits/stdc++.h>
#define inf 1000000009
#define ll          long long
#define pb          push_back
#define F           first
#define S           second
#define N  100005
#define PI 3.14159265359
#define hell 1000000007
#define rep(i,a,b) for(i=a;i<b;i++)
#define vi vector<int>
#define vii vector<pair<int,int> >
#define vd vector<double>
#define vdd vector<pair<double,double> >
#define pii pair<int,int>

using namespace std;

int main()
{
    ios_base::sync_with_stdio(false);
    cin.tie(0);
    cout.tie(0);
    ll n,i,j,f,l;
    string arr[N];
    string s,s1="";
    vector<char> v;
    cin>>n;
    rep(i,0,n)
    {
        cin>>arr[i];
        ll p=arr[i].length();
        v.pb('<');
        v.pb('3');
        rep(j,0,p)
        v.pb(arr[i][j]);
    }
    v.pb('<');
        v.pb('3');
    //s1=s1+"<3";
    ll l1=v.size();
    //cout<<"s1  "<<s1<<"\n";
    cin>>s;
    l=s.length();
    if(l<l1)
        cout<<"no";
    else{
            j=0;
    rep(i,0,l)
    {
        if(j==l1)
        break;
       if(s[i]==v[j])
       {
           ++j;
           //cout<<j<<" ";
       }
    }
    if(j==l1)
        cout<<"yes";
    else
        cout<<"no";
}
}


#include <bits/stdc++.h>
using namespace std;
int main()
{
	int N,len,lenf,i,j,val=0;
	string s,s1,sf;
	s="<3";

	cin>>N;
	for(i=0;i<N;i++)
	{
		cin>>s1;
		s+=s1;
		s+="<3";
	}
	cin>>sf;
	len=s.size();
	lenf=sf.size();
	j=0;
	for(i=0;i<len;i++)
	{
		for(;j<lenf;j++)
		{
			if(s[i]==sf[j])
			break;
		}
		if(j==lenf)
		{
			val=1;
			break;
		}
		j++;
	}
	if(val==1)
	cout<<"no";
	else
	cout<<"yes";
}


#include <bits/stdc++.h>
using namespace std;
int main()
{
	int N,len,lenf,i,j,val=0;
	string s,s1,sf;
	s="<3";

	cin>>N;
	for(i=0;i<N;i++)
	{
		cin>>s1;
		s+=s1;
		s+="<3";
	}
	cin>>sf;
	len=s.size();
	lenf=sf.size();
	j=0;
	for(i=0;i<len;i++)
	{
		for(;j<lenf;j++)
		{
			if(s[i]==sf[j])
			break;
		}
		if(j==lenf)
		{
			val=1;
			break;
		}
	}
	if(val==1)
	cout<<"no";
	else
	cout<<"yes";
}


#include <bits/stdc++.h>

typedef long long ll;

static inline void setio(void);

int main(void) {
	setio();

	ll n; std::cin >> n;
	std::stringstream ss("<3");
	for (ll i = 0; i < n; ++i) {
		std::string str;
		std::cin >> str;
		ss << str << "<3";
	}

	std::string needle = ss.str();

	std::string haystack;
	std::cin >> haystack;

	bool good = true;
	for (ll i = 0, j = 0; i < needle.length() && j < haystack.length(); ++i) {
		while (j < haystack.length() && haystack[j] != needle[i])
			++j;
		good = good && j < haystack.length();
	}

	std::cout << (good ? "yes" : "no") << "\n";

	return 0;
}

static inline void setio(void) {
	std::ios::sync_with_stdio(false);std::cin.tie(nullptr);
	std::cout.precision(10); std::cout << std::fixed;
}


#include <bits/stdc++.h>

typedef long long ll;

static inline void setio(void);

int main(void) {
	setio();

	ll n; std::cin >> n;
	std::stringstream ss;
	ss << "<3";
	for (ll i = 0; i < n; ++i) {
		std::string str;
		std::cin >> str;
		ss << str << "<3";
	}

	std::string needle = ss.str();

	// std::cout << needle << "\n";

	std::string haystack;
	std::cin >> haystack;

	bool good = true;
	for (ll i = 0, j = 0; i < needle.length() && j < haystack.length(); ++i) {
		while (j < haystack.length() && haystack[j] != needle[i])
			// ++j;
		good = good && j < haystack.length();
	}

	std::cout << (good ? "yes" : "no") << "\n";

	return 0;
}

static inline void setio(void) {
	std::ios::sync_with_stdio(false);std::cin.tie(nullptr);
	std::cout.precision(10); std::cout << std::fixed;
}


#include <bits/stdc++.h>

typedef long long ll;

static inline void setio(void);

int main(void) {
	setio();

	ll n; std::cin >> n;
	std::stringstream ss;
	ss << "<3";
	for (ll i = 0; i < n; ++i) {
		std::string str;
		std::cin >> str;
		ss << str << "<3";
	}

	std::string needle = ss.str();

	// std::cout << needle << "\n";

	std::string haystack;
	std::cin >> haystack;

	bool good = true;
	ll i,j;
	for (i = 0, j = 0; i < needle.length() && j < haystack.length(); ++i) {
		while (j < haystack.length() && haystack[j] != needle[i])
			++j;
		good = good && j < haystack.length();
		++j;
	}

	good = good && i >= needle.length();

	std::cout << (good ? "yes" : "no") << "\n";

	return 0;
}

static inline void setio(void) {
	std::ios::sync_with_stdio(false);std::cin.tie(nullptr);
	std::cout.precision(10); std::cout << std::fixed;
}


#include <bits/stdc++.h>

typedef long long ll;

static inline void setio(void);

int main(void) {
	setio();

	ll n; std::cin >> n;
	std::stringstream ss;
	ss << "<3";
	for (ll i = 0; i < n; ++i) {
		std::string str;
		std::cin >> str;
		ss << str << "<3";
	}

	std::string needle = ss.str();

	// std::cout << needle << "\n";

	std::string haystack;
	std::cin >> haystack;

	bool good = true;
	for (ll i = 0, j = 0; i < needle.length() && j < haystack.length(); ++i) {
		while (j < haystack.length() && haystack[j] != needle[i])
			++j;
		good = good && j < haystack.length();
		++j;
	}

	std::cout << (good ? "yes" : "no") << "\n";

	return 0;
}

static inline void setio(void) {
	std::ios::sync_with_stdio(false);std::cin.tie(nullptr);
	std::cout.precision(10); std::cout << std::fixed;
}


#include <bits/stdc++.h>

typedef long long ll;

static inline void setio(void);

int main(void) {
	setio();

	ll n; std::cin >> n;
	std::stringstream ss;
	ss << "<3";
	for (ll i = 0; i < n; ++i) {
		std::string str;
		std::cin >> str;
		ss << str << "<3";
	}

	std::string needle = ss.str();

	// std::cout << needle << "\n";

	std::string haystack;
	std::cin >> haystack;

	bool good = true;
	for (ll i = 0, j = 0; i < needle.length() && j < haystack.length(); ++i) {
		while (j < haystack.length() && haystack[j] != needle[i])
			++j;
		good = good && j < haystack.length();
	}

	std::cout << (good ? "yes" : "no") << "\n";

	return 0;
}

static inline void setio(void) {
	std::ios::sync_with_stdio(false);std::cin.tie(nullptr);
	std::cout.precision(10); std::cout << std::fixed;
}


/**
 * Created with IntelliJ IDEA.
 * User: olethra
 * Date: 25/10/13
 * Time: 18:56
 * To change this template use File | Settings | File Templates.
 */

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.PrintWriter;
import java.util.StringTokenizer;

public class TaskB {

    StringTokenizer st;
    BufferedReader in;
    PrintWriter out;

    public static void main(String[] args) throws NumberFormatException,
            IOException {
        TaskB solver = new TaskB();
        solver.open();
        long time = System.currentTimeMillis();
        solver.solve();
        if (!"true".equals(System.getProperty("ONLINE_JUDGE"))) {
            System.out.println("Spent time: "
                    + (System.currentTimeMillis() - time));
            System.out.println("Memory: "
                    + (Runtime.getRuntime().totalMemory() - Runtime
                    .getRuntime().freeMemory()));
        }
        solver.close();
    }

    public void open() throws IOException {
        in = new BufferedReader(new InputStreamReader(System.in));
        out = new PrintWriter(System.out);
        //in = new BufferedReader(new FileReader("input.txt"));
        //out = new PrintWriter(new FileWriter("output.txt"));
    }

    public String nextToken() throws IOException {
        while (st == null || !st.hasMoreTokens()) {
            String line = in.readLine();
            if (line == null)
                return null;
            st = new StringTokenizer(line);
        }
        return st.nextToken();
    }

    public int nextInt() throws NumberFormatException, IOException {
        return Integer.parseInt(nextToken());
    }

    public long nextLong() throws NumberFormatException, IOException {
        return Long.parseLong(nextToken());
    }

    public double nextDouble() throws NumberFormatException, IOException {
        return Double.parseDouble(nextToken());
    }

    boolean hasMoreTokens() throws IOException {
        while (st == null || !st.hasMoreTokens()) {
            String line = in.readLine();
            if (line == null)
                return false;
            st = new StringTokenizer(line);
        }
        return true;
    }

    public void solve() throws NumberFormatException, IOException {
        int n = nextInt();
        String[] words = new String[n];
        for (int i = 0; i < n; i++) {
            words[i] = nextToken();
        }
        String message = nextToken();
        int i = 0;
        int j = 0;
        int wordsNum = 0;
        boolean heartWasLast = false;
        while (i < message.length()) {
            while (i < message.length() && message.charAt(i) != '<') i++;
            if (i == message.length()) {
                System.out.println("no");
                return;
            }
            while (i < message.length() && message.charAt(i) != '3') i++;
            if (i == message.length()) {
                System.out.println("no");
                return;
            }
            heartWasLast = true;
            j = 0;
            if (wordsNum < words.length) {
                while (j < words[wordsNum].length() && i < message.length()) {
                    while (i < message.length() && words[wordsNum].charAt(j) != message.charAt(i)) {
                        i++;
                    }
                    if (i < message.length()) j++;
                }
                if (j < words[wordsNum].length()) {
                    System.out.println("no");
                    return;
                } else {
                    heartWasLast = false;
                    wordsNum++;
                }
            } else break;

        }
        if (heartWasLast && wordsNum == words.length) System.out.println("yes");
        else System.out.println("no");
//        if (message.charAt(0) != '<' || 1 == message.length() || message.charAt(1) != '3') {
//            System.out.println("no");
//            return;
//        }
//        boolean heartWasLast = true;
//        int lastLess = 0;
//        boolean lessWasFound = false;
//        int i = 2;
//        int cntWords = 0;
//
//        while (i < message.length()) {
//            String currentToken = "";
//            heartWasLast = false;
//            cntWords++;
//            lessWasFound = false;
//            boolean inWord = true;
//            while (inWord) {
//                if (message.charAt(i) >= 'a' && message.charAt(i) <= 'z') {
//                    currentToken += message.charAt(i);
//                    i++;
//                } else {
//                    if (message.charAt(i) == '<') {
////                        if (i + 1 < message.length()) {
////                            if (message.charAt(i + 1) == '3') {
////                                heartWasLast = true;
////                                i += 2;
////                                inWord = false;
////                            } else i++;
//                        lessWasFound = true;
//                        lastLess = i;
//                        i++;
//                        }
//                        else if (message.charAt(i) == '3' && lessWasFound){
//
//                    }
//                }
//                if (i == message.length()) inWord = false;
//            }
//            if (!heartWasLast) {
//                System.out.println("no");
//                return;
//            }
//
//            int j = 0;
//            int k = 0;
//            while (j < words[cntWords - 1].length() && k < currentToken.length()) {
//                while (k < currentToken.length() && words[cntWords - 1].charAt(j) != currentToken.charAt(k)) {
//                    k++;
//                }
//                if (k<currentToken.length()) j++;
//            }
//            if (j != words[cntWords - 1].length())  {
//                System.out.println("no");
//                return;
//            }
//        }
//        if (cntWords < words.length || !heartWasLast) {
//            System.out.println("no");
//        } else System.out.println("yes");
    }

    public void close() {
        out.flush();
        out.close();
    }
}


/**
 * Created with IntelliJ IDEA.
 * User: olethra
 * Date: 25/10/13
 * Time: 18:56
 * To change this template use File | Settings | File Templates.
 */

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.PrintWriter;
import java.util.StringTokenizer;

public class TaskB {

    StringTokenizer st;
    BufferedReader in;
    PrintWriter out;

    public static void main(String[] args) throws NumberFormatException,
            IOException {
        TaskB solver = new TaskB();
        solver.open();
        long time = System.currentTimeMillis();
        solver.solve();
        if (!"true".equals(System.getProperty("ONLINE_JUDGE"))) {
            System.out.println("Spent time: "
                    + (System.currentTimeMillis() - time));
            System.out.println("Memory: "
                    + (Runtime.getRuntime().totalMemory() - Runtime
                    .getRuntime().freeMemory()));
        }
        solver.close();
    }

    public void open() throws IOException {
        in = new BufferedReader(new InputStreamReader(System.in));
        out = new PrintWriter(System.out);
        //in = new BufferedReader(new FileReader("input.txt"));
        //out = new PrintWriter(new FileWriter("output.txt"));
    }

    public String nextToken() throws IOException {
        while (st == null || !st.hasMoreTokens()) {
            String line = in.readLine();
            if (line == null)
                return null;
            st = new StringTokenizer(line);
        }
        return st.nextToken();
    }

    public int nextInt() throws NumberFormatException, IOException {
        return Integer.parseInt(nextToken());
    }

    public long nextLong() throws NumberFormatException, IOException {
        return Long.parseLong(nextToken());
    }

    public double nextDouble() throws NumberFormatException, IOException {
        return Double.parseDouble(nextToken());
    }

    boolean hasMoreTokens() throws IOException {
        while (st == null || !st.hasMoreTokens()) {
            String line = in.readLine();
            if (line == null)
                return false;
            st = new StringTokenizer(line);
        }
        return true;
    }

    public void solve() throws NumberFormatException, IOException {
        int n = nextInt();
        String[] words = new String[n];
        for (int i = 0; i < n; i++) {
            words[i] = nextToken();
        }
        String message = nextToken();
        int i = 0;
        int j = 0;
        int wordsNum = 0;
        boolean heartWasLast = false;
        while (i < message.length()) {
            while (i < message.length() && message.charAt(i) != '<') i++;
            if (i == message.length()) {
                System.out.println("no");
                return;
            }
            while (i < message.length() && message.charAt(i) != '3') i++;
            if (i == message.length()) {
                System.out.println("no");
                return;
            }
            heartWasLast = true;
            j = 0;
            if (wordsNum < words.length) {
                while (j < words[wordsNum].length() && i < message.length()) {
                    while (i < message.length() && words[wordsNum].charAt(j) != message.charAt(i)) {
                        i++;
                    }
                    if (i < message.length()) {
                        j++;
                        i++;
                    }
                }
                if (j < words[wordsNum].length()) {
                    System.out.println("no");
                    return;
                } else {
                    heartWasLast = false;
                    wordsNum++;
                }
            } else break;

        }
        if (heartWasLast && wordsNum == words.length) System.out.println("yes");
        else System.out.println("no");
//        if (message.charAt(0) != '<' || 1 == message.length() || message.charAt(1) != '3') {
//            System.out.println("no");
//            return;
//        }
//        boolean heartWasLast = true;
//        int lastLess = 0;
//        boolean lessWasFound = false;
//        int i = 2;
//        int cntWords = 0;
//
//        while (i < message.length()) {
//            String currentToken = "";
//            heartWasLast = false;
//            cntWords++;
//            lessWasFound = false;
//            boolean inWord = true;
//            while (inWord) {
//                if (message.charAt(i) >= 'a' && message.charAt(i) <= 'z') {
//                    currentToken += message.charAt(i);
//                    i++;
//                } else {
//                    if (message.charAt(i) == '<') {
////                        if (i + 1 < message.length()) {
////                            if (message.charAt(i + 1) == '3') {
////                                heartWasLast = true;
////                                i += 2;
////                                inWord = false;
////                            } else i++;
//                        lessWasFound = true;
//                        lastLess = i;
//                        i++;
//                        }
//                        else if (message.charAt(i) == '3' && lessWasFound){
//
//                    }
//                }
//                if (i == message.length()) inWord = false;
//            }
//            if (!heartWasLast) {
//                System.out.println("no");
//                return;
//            }
//
//            int j = 0;
//            int k = 0;
//            while (j < words[cntWords - 1].length() && k < currentToken.length()) {
//                while (k < currentToken.length() && words[cntWords - 1].charAt(j) != currentToken.charAt(k)) {
//                    k++;
//                }
//                if (k<currentToken.length()) j++;
//            }
//            if (j != words[cntWords - 1].length())  {
//                System.out.println("no");
//                return;
//            }
//        }
//        if (cntWords < words.length || !heartWasLast) {
//            System.out.println("no");
//        } else System.out.println("yes");
    }

    public void close() {
        out.flush();
        out.close();
    }
}


import java.util.*;

public class Main {
    private static final long MOD = 1000000007;

    public static void main(String[] args) throws Exception {
        Scanner scan = new Scanner(System.in);

        int n = scan.nextInt();
        scan.nextLine();
        StringBuilder builder = new StringBuilder();
        for (int i = 0; i < n; i++) {
            builder.append(scan.nextLine());
        }

        char[] require = builder.toString().toCharArray();
        char[] input = scan.nextLine().toCharArray();
        int head = 0;
        while (head < input.length) {
            if (input[head] == '<') {
                head++;
                break;
            }
            head++;
        }
        while (head < input.length) {
            if (input[head] == '3') {
                head++;
                break;
            }
            head++;
        }

        int tail = input.length - 1;
        while (tail >= 0) {
            if (input[tail] == '3') {
                tail--;
                break;
            }
            tail--;
        }
        while (tail >= 0) {
            if (input[tail] == '<') {
                tail--;
                break;
            }
            tail--;
        }

        if (head > tail) {
            System.out.println("no");
        } else {
            HashSet<Integer> current = new HashSet<Integer>();
            HashSet<Integer> next = new HashSet<Integer>();
            current.add(0);
            boolean pass = false;
            for (int i = head; i <= tail; i++) {
                for (int pos : current) {
                    if (require[pos] == input[i]) {
                        next.add(pos + 1);
                    } else if (pos + tail - i >= require.length) {
                        next.add(pos);
                    }
                }

                if (next.contains(require.length)) {
                    pass = true;
                    break;
                }
                HashSet<Integer> temp = current;
                current = next;
                next = temp;
                next.clear();
            }

            System.out.println(pass ? "yes" : "no");
        }

        scan.close();
    }

    private static void print(int... arr) {
        System.out.print(arr[0]);
        for (int i = 1; i < arr.length; i++) {
            System.out.print(" ");
            System.out.print(arr[i]);
        }
        System.out.println();
    }

    private static void print(long... arr) {
        System.out.print(arr[0]);
        for (int i = 1; i < arr.length; i++) {
            System.out.print(" ");
            System.out.print(arr[i]);
        }
        System.out.println();
    }

    private static <T> void print(T... arr) {
        System.out.print(arr[0]);
        for (int i = 1; i < arr.length; i++) {
            System.out.print(" ");
            System.out.print(arr[i]);
        }
        System.out.println();
    }

    private static void read(Scanner scan, int[]... arrs) {
        int len = arrs[0].length;
        for (int i = 0; i < len; i++) {
            for (int[] arr : arrs) {
                arr[i] = scan.nextInt();
            }
        }
    }

    private static void read(Scanner scan, long[]... arrs) {
        int len = arrs[0].length;
        for (int i = 0; i < len; i++) {
            for (long[] arr : arrs) {
                arr[i] = scan.nextLong();
            }
        }
    }

    private static void decreaseByOne(int[]... arrs) {
        for (int[] arr : arrs) {
            for (int i = 0; i < arr.length; i++) {
                arr[i] --;
            }
        }
    }
}


import java.util.*;

public class Main {
    private static final long MOD = 1000000007;

    public static void main(String[] args) throws Exception {
        Scanner scan = new Scanner(System.in);

        int n = scan.nextInt();
        scan.nextLine();
        StringBuilder builder = new StringBuilder();
        HashSet<Integer> checkpoints = new HashSet<Integer>();
        for (int i = 0; i < n; i++) {
            builder.append(scan.nextLine());
            checkpoints.add(builder.length());
        }

        char[] require = builder.toString().toCharArray();
        char[] input = scan.nextLine().toCharArray();
        int head = 0;
        while (head < input.length) {
            if (input[head] == '<') {
                head++;
                break;
            }
            head++;
        }
        while (head < input.length) {
            if (input[head] == '3') {
                head++;
                break;
            }
            head++;
        }

        int tail = input.length - 1;
        while (tail >= 0) {
            if (input[tail] == '3') {
                tail--;
                break;
            }
            tail--;
        }
        while (tail >= 0) {
            if (input[tail] == '<') {
                tail--;
                break;
            }
            tail--;
        }

        if (head > tail) {
            System.out.println("no");
        } else {
            HashSet<Integer> current = new HashSet<Integer>();
            HashSet<Integer> next = new HashSet<Integer>();
            int[] check = new int[require.length];
            current.add(0);
            boolean pass = false;
            for (int i = head; i <= tail; i++) {
                for (int pos : current) {
                    if (checkpoints.contains(pos) && check[pos] < 2) {
                        if (check[pos] == 0 && input[i] == '<') {
                            check[pos] = 1;
                        } else if (check[pos] == 1 && input[i] == '3') {
                            check[pos] = 2;
                        }
                        if (pos + tail - i >= require.length) {
                            next.add(pos);
                        }
                        continue;
                    }

                    if (require[pos] == input[i]) {
                        next.add(pos + 1);
                    } else if (pos + tail - i >= require.length) {
                        next.add(pos);
                    }
                }

                if (next.contains(require.length)) {
                    pass = true;
                    break;
                }
                HashSet<Integer> temp = current;
                current = next;
                next = temp;
                next.clear();
            }

            System.out.println(pass ? "yes" : "no");
        }

        scan.close();
    }

    private static void print(int... arr) {
        System.out.print(arr[0]);
        for (int i = 1; i < arr.length; i++) {
            System.out.print(" ");
            System.out.print(arr[i]);
        }
        System.out.println();
    }

    private static void print(long... arr) {
        System.out.print(arr[0]);
        for (int i = 1; i < arr.length; i++) {
            System.out.print(" ");
            System.out.print(arr[i]);
        }
        System.out.println();
    }

    private static <T> void print(T... arr) {
        System.out.print(arr[0]);
        for (int i = 1; i < arr.length; i++) {
            System.out.print(" ");
            System.out.print(arr[i]);
        }
        System.out.println();
    }

    private static void read(Scanner scan, int[]... arrs) {
        int len = arrs[0].length;
        for (int i = 0; i < len; i++) {
            for (int[] arr : arrs) {
                arr[i] = scan.nextInt();
            }
        }
    }

    private static void read(Scanner scan, long[]... arrs) {
        int len = arrs[0].length;
        for (int i = 0; i < len; i++) {
            for (long[] arr : arrs) {
                arr[i] = scan.nextLong();
            }
        }
    }

    private static void decreaseByOne(int[]... arrs) {
        for (int[] arr : arrs) {
            for (int i = 0; i < arr.length; i++) {
                arr[i] --;
            }
        }
    }
}


import java.io.IOException;
import java.io.PrintStream;
import java.io.PrintWriter;
import java.io.StreamCorruptedException;
import java.math.BigInteger;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.InputMismatchException;
import java.util.LinkedList;
import java.util.PriorityQueue;
import java.util.TreeSet;
import java.util.regex.Matcher;
import java.util.regex.Pattern;

public class Solution
{
    public static void main(String[] args) {
        new Solution().solve();
    }

    PrintWriter out;
    public void solve()
    {
        out=new PrintWriter(System.out);
        int n=in.nextInt();
        String[] s=new String[n];

        for(int i=0;i<n;i++)
        {
            s[i]=in.nextLine();
        }
    //  System.out.println(sb);
        String str=in.nextLine();

        int strcount=0;

        for(int i=0;i<n;i++)
        {
            while(str.charAt(strcount++)!='<')
            {
                if(strcount==str.length())
                {
                    System.out.println("no");
                    System.exit(0);
                }
                continue;
            }
            while(str.charAt(strcount++)!='3')
            {
                if(strcount==str.length())
                {
                    System.out.println("no");
                    System.exit(0);
                }
                continue;
            }
            for(int j=0;j<s[i].length();j++)
            {
                while(str.charAt(strcount++)!=s[i].charAt(j))
                {
                    if(strcount==str.length())
                    {
                        System.out.println("no");
                        System.exit(0);
                    }
                    continue;
                }
            }
        }
        while(str.charAt(strcount++)!='<')
        {
            if(strcount==str.length())
            {
                System.out.println("no");
                System.exit(0);
            }
            continue;
        }
        while(str.charAt(strcount++)!='3')
        {
            if(strcount==str.length())
            {
                System.out.println("no");
                System.exit(0);
            }
            continue;
        }
        System.out.println("yes");
        out.close();
    }

    FasterScanner in=new FasterScanner();

    public class FasterScanner {
        private byte[] buf = new byte[1024];
        private int curChar;
        private int numChars;

        public int read() {
            if (numChars == -1)
                throw new InputMismatchException();
            if (curChar >= numChars) {
                curChar = 0;
                try {
                    numChars = System.in.read(buf);
                } catch (IOException e) {
                    throw new InputMismatchException();
                }
                if (numChars <= 0)
                    return -1;
            }
            return buf[curChar++];
        }

        public String nextLine() {
            int c = read();
            while (isSpaceChar(c))
                c = read();
            StringBuilder res = new StringBuilder();
            do {
                res.appendCodePoint(c);
                c = read();
            } while (!isEndOfLine(c));
            return res.toString();
        }

        public String nextString() {
            int c = read();
            while (isSpaceChar(c))
                c = read();
            StringBuilder res = new StringBuilder();
            do {
                res.appendCodePoint(c);
                c = read();
            } while (!isSpaceChar(c));
            return res.toString();
        }

        public long nextLong() {
            int c = read();
            while (isSpaceChar(c))
                c = read();
            int sgn = 1;
            if (c == '-') {
                sgn = -1;
                c = read();
            }
            long res = 0;
            do {
                if (c < '0' || c > '9')
                    throw new InputMismatchException();
                res *= 10;
                res += c - '0';
                c = read();
            } while (!isSpaceChar(c));
            return res * sgn;
        }

        public int nextInt() {
            int c = read();
            while (isSpaceChar(c))
                c = read();
            int sgn = 1;
            if (c == '-') {
                sgn = -1;
                c = read();
            }
            int res = 0;
            do {
                if (c < '0' || c > '9')
                    throw new InputMismatchException();
                res *= 10;
                res += c - '0';
                c = read();
            } while (!isSpaceChar(c));
            return res * sgn;
        }

        public int[] nextIntArray(int n) {
            int[] arr = new int[n];
            for (int i = 0; i < n; i++) {
                arr[i] = nextInt();
            }
            return arr;
        }

        public long[] nextLongArray(int n) {
            long[] arr = new long[n];
            for (int i = 0; i < n; i++) {
                arr[i] = nextLong();
            }
            return arr;
        }

        private boolean isSpaceChar(int c) {
            return c == ' ' || c == '\n' || c == '\r' || c == '\t' || c == -1;
        }

        private boolean isEndOfLine(int c) {
            return c == '\n' || c == '\r' || c == -1;
        }
    }
}


import java.io.IOException;
import java.io.PrintStream;
import java.io.PrintWriter;
import java.io.StreamCorruptedException;
import java.math.BigInteger;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.InputMismatchException;
import java.util.LinkedList;
import java.util.PriorityQueue;
import java.util.TreeSet;
import java.util.regex.Matcher;
import java.util.regex.Pattern;

public class Solution
{
    public static void main(String[] args) {
        new Solution().solve();
    }

    PrintWriter out;
    public void solve()
    {
        out=new PrintWriter(System.out);
        int n=in.nextInt();
        StringBuilder sb=new StringBuilder();
        sb.append(".*[<].*[3].*");
        for(int i=0;i<n;i++)
        {
            String t=in.nextLine();
            for(int j=0;j<t.length();j++)
            {
                sb.append("["+t.charAt(j)+"].*");
            }
            sb.append("[<].*[3].*");
        }
    //  System.out.println(sb);
        String str=in.nextLine();
        if(str.matches(sb.toString()))
        {
            System.out.println("yes");
        }
        else
        {
            System.out.println("no");
        }
        out.close();
    }

    FasterScanner in=new FasterScanner();

    public class FasterScanner {
        private byte[] buf = new byte[1024];
        private int curChar;
        private int numChars;

        public int read() {
            if (numChars == -1)
                throw new InputMismatchException();
            if (curChar >= numChars) {
                curChar = 0;
                try {
                    numChars = System.in.read(buf);
                } catch (IOException e) {
                    throw new InputMismatchException();
                }
                if (numChars <= 0)
                    return -1;
            }
            return buf[curChar++];
        }

        public String nextLine() {
            int c = read();
            while (isSpaceChar(c))
                c = read();
            StringBuilder res = new StringBuilder();
            do {
                res.appendCodePoint(c);
                c = read();
            } while (!isEndOfLine(c));
            return res.toString();
        }

        public String nextString() {
            int c = read();
            while (isSpaceChar(c))
                c = read();
            StringBuilder res = new StringBuilder();
            do {
                res.appendCodePoint(c);
                c = read();
            } while (!isSpaceChar(c));
            return res.toString();
        }

        public long nextLong() {
            int c = read();
            while (isSpaceChar(c))
                c = read();
            int sgn = 1;
            if (c == '-') {
                sgn = -1;
                c = read();
            }
            long res = 0;
            do {
                if (c < '0' || c > '9')
                    throw new InputMismatchException();
                res *= 10;
                res += c - '0';
                c = read();
            } while (!isSpaceChar(c));
            return res * sgn;
        }

        public int nextInt() {
            int c = read();
            while (isSpaceChar(c))
                c = read();
            int sgn = 1;
            if (c == '-') {
                sgn = -1;
                c = read();
            }
            int res = 0;
            do {
                if (c < '0' || c > '9')
                    throw new InputMismatchException();
                res *= 10;
                res += c - '0';
                c = read();
            } while (!isSpaceChar(c));
            return res * sgn;
        }

        public int[] nextIntArray(int n) {
            int[] arr = new int[n];
            for (int i = 0; i < n; i++) {
                arr[i] = nextInt();
            }
            return arr;
        }

        public long[] nextLongArray(int n) {
            long[] arr = new long[n];
            for (int i = 0; i < n; i++) {
                arr[i] = nextLong();
            }
            return arr;
        }

        private boolean isSpaceChar(int c) {
            return c == ' ' || c == '\n' || c == '\r' || c == '\t' || c == -1;
        }

        private boolean isEndOfLine(int c) {
            return c == '\n' || c == '\r' || c == -1;
        }
    }
}


import java.io.IOException;
import java.io.PrintStream;
import java.io.PrintWriter;
import java.io.StreamCorruptedException;
import java.math.BigInteger;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.InputMismatchException;
import java.util.LinkedList;
import java.util.PriorityQueue;
import java.util.TreeSet;
import java.util.regex.Matcher;
import java.util.regex.Pattern;

public class Solution
{
    public static void main(String[] args) {
        new Solution().solve();
    }

    PrintWriter out;
    public void solve()
    {
        out=new PrintWriter(System.out);
        int n=in.nextInt();
        String[] s=new String[n];

        for(int i=0;i<n;i++)
        {
            s[i]=in.nextLine();
        }
    //  System.out.println(sb);
        String str=in.nextLine();

        int strcount=0;

        for(int i=0;i<n;i++)
        {
            if(strcount==str.length())
            {
                System.out.println("no");
                System.exit(0);
            }
            while(str.charAt(strcount++)!='<')
            {
                if(strcount==str.length())
                {
                    System.out.println("no");
                    System.exit(0);
                }

            }
            if(strcount==str.length())
            {
                System.out.println("no");
                System.exit(0);
            }
            while(str.charAt(strcount++)!='3')
            {
                if(strcount==str.length())
                {
                    System.out.println("no");
                    System.exit(0);
                }

            }
            if(strcount==str.length())
            {
                System.out.println("no");
                System.exit(0);
            }
            for(int j=0;j<s[i].length();j++)
            {
                while(str.charAt(strcount++)!=s[i].charAt(j))
                {
                    if(strcount==str.length())
                    {
                        System.out.println("no");
                        System.exit(0);
                    }
                }
                if(strcount==str.length())
                {
                    System.out.println("no");
                    System.exit(0);
                }
            }
        }
        if(strcount==str.length())
        {
            System.out.println("no");
            System.exit(0);
        }
        while(str.charAt(strcount++)!='<')
        {
            if(strcount==str.length())
            {
                System.out.println("no");
                System.exit(0);
            }
        }
        if(strcount==str.length())
        {
            System.out.println("no");
            System.exit(0);
        }
        while(str.charAt(strcount++)!='3')
        {
            if(strcount==str.length())
            {
                System.out.println("no");
                System.exit(0);
            }
        }
        System.out.println("yes");
        out.close();
    }

    FasterScanner in=new FasterScanner();

    public class FasterScanner {
        private byte[] buf = new byte[1024];
        private int curChar;
        private int numChars;

        public int read() {
            if (numChars == -1)
                throw new InputMismatchException();
            if (curChar >= numChars) {
                curChar = 0;
                try {
                    numChars = System.in.read(buf);
                } catch (IOException e) {
                    throw new InputMismatchException();
                }
                if (numChars <= 0)
                    return -1;
            }
            return buf[curChar++];
        }

        public String nextLine() {
            int c = read();
            while (isSpaceChar(c))
                c = read();
            StringBuilder res = new StringBuilder();
            do {
                res.appendCodePoint(c);
                c = read();
            } while (!isEndOfLine(c));
            return res.toString();
        }

        public String nextString() {
            int c = read();
            while (isSpaceChar(c))
                c = read();
            StringBuilder res = new StringBuilder();
            do {
                res.appendCodePoint(c);
                c = read();
            } while (!isSpaceChar(c));
            return res.toString();
        }

        public long nextLong() {
            int c = read();
            while (isSpaceChar(c))
                c = read();
            int sgn = 1;
            if (c == '-') {
                sgn = -1;
                c = read();
            }
            long res = 0;
            do {
                if (c < '0' || c > '9')
                    throw new InputMismatchException();
                res *= 10;
                res += c - '0';
                c = read();
            } while (!isSpaceChar(c));
            return res * sgn;
        }

        public int nextInt() {
            int c = read();
            while (isSpaceChar(c))
                c = read();
            int sgn = 1;
            if (c == '-') {
                sgn = -1;
                c = read();
            }
            int res = 0;
            do {
                if (c < '0' || c > '9')
                    throw new InputMismatchException();
                res *= 10;
                res += c - '0';
                c = read();
            } while (!isSpaceChar(c));
            return res * sgn;
        }

        public int[] nextIntArray(int n) {
            int[] arr = new int[n];
            for (int i = 0; i < n; i++) {
                arr[i] = nextInt();
            }
            return arr;
        }

        public long[] nextLongArray(int n) {
            long[] arr = new long[n];
            for (int i = 0; i < n; i++) {
                arr[i] = nextLong();
            }
            return arr;
        }

        private boolean isSpaceChar(int c) {
            return c == ' ' || c == '\n' || c == '\r' || c == '\t' || c == -1;
        }

        private boolean isEndOfLine(int c) {
            return c == '\n' || c == '\r' || c == -1;
        }
    }
}


import java.io.IOException;
import java.io.PrintStream;
import java.io.PrintWriter;
import java.io.StreamCorruptedException;
import java.math.BigInteger;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.InputMismatchException;
import java.util.LinkedList;
import java.util.PriorityQueue;
import java.util.TreeSet;
import java.util.regex.Matcher;
import java.util.regex.Pattern;

public class Solution
{
    public static void main(String[] args) {
        new Solution().solve();
    }

    PrintWriter out;
    public void solve()
    {
        out=new PrintWriter(System.out);
        int n=in.nextInt();
        String[] s=new String[n];

        for(int i=0;i<n;i++)
        {
            s[i]=in.nextLine();
        }
    //  System.out.println(sb);
        String str=in.nextLine();

        int strcount=0;

        for(int i=0;i<n;i++)
        {
            if(strcount==str.length())
            {
                System.out.println("no");
                System.exit(0);
            }
            while(str.charAt(strcount++)!='<')
            {
                if(strcount==str.length())
                {
                    System.out.println("no");
                    System.exit(0);
                }

            }
            if(strcount==str.length())
            {
                System.out.println("no");
                System.exit(0);
            }
            while(str.charAt(strcount++)!='3')
            {
                if(strcount==str.length())
                {
                    System.out.println("no");
                    System.exit(0);
                }

            }
            for(int j=0;j<s[i].length();j++)
            {
                while(str.charAt(strcount++)!=s[i].charAt(j))
                {
                    if(strcount==str.length())
                    {
                        System.out.println("no");
                        System.exit(0);
                    }
                }
                if(strcount==str.length())
                {
                    System.out.println("no");
                    System.exit(0);
                }
            }
        }
        if(strcount==str.length())
        {
            System.out.println("no");
            System.exit(0);
        }
        while(str.charAt(strcount++)!='<')
        {
            if(strcount==str.length())
            {
                System.out.println("no");
                System.exit(0);
            }
        }
        if(strcount==str.length())
        {
            System.out.println("no");
            System.exit(0);
        }
        while(str.charAt(strcount++)!='3')
        {
            if(strcount==str.length())
            {
                System.out.println("no");
                System.exit(0);
            }
        }
        System.out.println("yes");
        out.close();
    }

    FasterScanner in=new FasterScanner();

    public class FasterScanner {
        private byte[] buf = new byte[1024];
        private int curChar;
        private int numChars;

        public int read() {
            if (numChars == -1)
                throw new InputMismatchException();
            if (curChar >= numChars) {
                curChar = 0;
                try {
                    numChars = System.in.read(buf);
                } catch (IOException e) {
                    throw new InputMismatchException();
                }
                if (numChars <= 0)
                    return -1;
            }
            return buf[curChar++];
        }

        public String nextLine() {
            int c = read();
            while (isSpaceChar(c))
                c = read();
            StringBuilder res = new StringBuilder();
            do {
                res.appendCodePoint(c);
                c = read();
            } while (!isEndOfLine(c));
            return res.toString();
        }

        public String nextString() {
            int c = read();
            while (isSpaceChar(c))
                c = read();
            StringBuilder res = new StringBuilder();
            do {
                res.appendCodePoint(c);
                c = read();
            } while (!isSpaceChar(c));
            return res.toString();
        }

        public long nextLong() {
            int c = read();
            while (isSpaceChar(c))
                c = read();
            int sgn = 1;
            if (c == '-') {
                sgn = -1;
                c = read();
            }
            long res = 0;
            do {
                if (c < '0' || c > '9')
                    throw new InputMismatchException();
                res *= 10;
                res += c - '0';
                c = read();
            } while (!isSpaceChar(c));
            return res * sgn;
        }

        public int nextInt() {
            int c = read();
            while (isSpaceChar(c))
                c = read();
            int sgn = 1;
            if (c == '-') {
                sgn = -1;
                c = read();
            }
            int res = 0;
            do {
                if (c < '0' || c > '9')
                    throw new InputMismatchException();
                res *= 10;
                res += c - '0';
                c = read();
            } while (!isSpaceChar(c));
            return res * sgn;
        }

        public int[] nextIntArray(int n) {
            int[] arr = new int[n];
            for (int i = 0; i < n; i++) {
                arr[i] = nextInt();
            }
            return arr;
        }

        public long[] nextLongArray(int n) {
            long[] arr = new long[n];
            for (int i = 0; i < n; i++) {
                arr[i] = nextLong();
            }
            return arr;
        }

        private boolean isSpaceChar(int c) {
            return c == ' ' || c == '\n' || c == '\r' || c == '\t' || c == -1;
        }

        private boolean isEndOfLine(int c) {
            return c == '\n' || c == '\r' || c == -1;
        }
    }
}


import java.util.Scanner;
import java.io.File;
import java.lang.Math;

public class B {
    private Scanner sc;
    int n;
    static int t = 0;
    static int len;
    String[] s;
    static String mess;

    public static void main(String[] args) throws Exception {
        B cl = new B();
        cl.input();
        cl.solve();
        cl.output();
    }
    public void input() throws Exception {
        sc = new Scanner(System.in);
//        sc = new Scanner(new File("input.txt"));
        n = sc.nextInt();
        s = new String [n + 1];
        for (int i = 0; i <= n; i++) {
            s[i] = sc.nextLine();
//            System.out.println(s[i]);
        }
        mess = sc.nextLine();
    }
    public void solve() throws Exception {
        len = (mess.toString()).length();
        for (int i = 1; i <= n; i++) {
            fff('<');
            fff('3');
            for (int j = 0; j < s[i].length(); j++) {
                fff(s[i].charAt(j));
            }
//            System.out.println(s[i]);
        }
        fff('<');
        fff('3');
    }
    static void fff(char c) {
        for (; t < len; t++) {
            if (mess.charAt(t) == c) {
                t++;
                return;
            }
        }
        System.out.println("no");
        System.exit(0);
    }
    public void output() throws Exception {
        System.out.println("yes");
    }
}


import java.util.Scanner;

public class Main {

    private static boolean matches(String needle,String haystack) {
        int n = 0;
        for (int i=0;i<haystack.length();i++) {
            if (needle.charAt(n) == haystack.charAt(i)) {
                n++;
                if (n == needle.length()) return true;
            }
        }
        return false;
    }

    public static void main(String[] args) {
        Scanner in = new Scanner(System.in);
        String line = "<3";
        int max = in.nextInt();
        in.nextLine();
        for (int i=0;i<max;i++) {
            line += in.nextLine()+"<3";
        }
        String line2 = in.nextLine();
        if (matches(line,line2)) {
            System.out.println("yes");
        }
        else System.out.println("no");
    }

}


import java.util.Scanner;

public class Main {

    private static boolean matches(String needle,String haystack) {
        int n = 0;
        for (int i=0;i<haystack.length();i++) {
            if (needle.charAt(n) == haystack.charAt(i)) {
                n++;
                if (n == needle.length()) return true;
            }
        }
        return false;
    }

    public static void main(String[] args) {
        Scanner in = new Scanner(System.in);
        String[] words = new String[in.nextInt()];
        in.nextLine();
        for (int i=0;i<words.length;i++) {
            words[i] = in.nextLine();
        }
        String[] words2 = in.nextLine().split("<.*?3");
        int n = 0;
        for (int i=0;i<words2.length;i++) {
            if (matches(words[n],words2[i])) {
                n++;
                if (n == words.length) {
                    System.out.println("yes");
                    return;
                }
            }
        }
        System.out.println("no");
    }

}


import java.util.Scanner;

public class Main {

    private static boolean matches(String needle,String haystack) {
        int n = 0;
        for (int i=0;i<haystack.length();i++) {
            if (needle.charAt(n) == haystack.charAt(i)) {
                n++;
                if (n == needle.length()) return true;
            }
        }
        return false;
    }

    public static void main(String[] args) {
        Scanner in = new Scanner(System.in);
        StringBuilder lineB = new StringBuilder("<3");
        int max = in.nextInt();
        in.nextLine();
        for (int i=0;i<max;i++) {
            lineB.append(in.nextLine());
            lineB.append("<3");
        }
        String line = lineB.toString();
        String line2 = in.nextLine();
        if (matches(line,line2)) {
            System.out.println("yes");
        }
        else System.out.println("no");
    }

}


import java.util.*;
import java.util.regex.*;
import java.text.*;
import java.math.*;

public class Solution
{

	public static void main(String args[]){
		Scanner scan = new Scanner(System.in);
		String line = scan.nextLine();
		Scanner sc = new Scanner(line);
		int n = sc.nextInt();
		String[] x = new String[n];
		for(int i=0;i<n;i++){
			x[i] = scan.nextLine();
		}
		String msg = scan.nextLine();
		for(int i=0;i<n;i++){
			String temp = "<3" + x[i];
			while(temp.length()>0){
				if(msg.length()==0){
					System.out.println("no");
					return;
				}
				if(msg.charAt(0)==temp.charAt(0)){
					temp = temp.substring(1);
					msg = msg.substring(1);
				}
				else
					msg = msg.substring(1);
			}
		}
		String temp = "<3";
		while(temp.length()>0){
			if(msg.length()==0){
				System.out.println("no");
				return;
			}
			if(msg.charAt(0)==temp.charAt(0)){
				temp = temp.substring(1);
				msg = msg.substring(1);
			}
			else
				msg = msg.substring(1);
		}
		System.out.println("yes");
	}

}


import java.util.*;
import java.util.regex.*;
import java.text.*;
import java.math.*;

public class Solution
{

	public static void main(String args[]){
		Scanner scan = new Scanner(System.in);
		String line = scan.nextLine();
		Scanner sc = new Scanner(line);
		int n = sc.nextInt();
		String[] x = new String[n];
		for(int i=0;i<n;i++){
			x[i] = scan.nextLine();
		}
		String msg = scan.nextLine();
		int k = 0;
		for(int i=0;i<n;i++){
			String temp = "<3" + x[i];
			int j=0;
			while(temp.length()>j){
				if(msg.length()==k){
					System.out.println("no");
					return;
				}
				if(msg.charAt(k)==temp.charAt(j)){
					k++;
					j++;
				}
				else
					k++;
			}
		}
		String temp = "<3";
		int j=0;
		while(temp.length()>j){
			if(msg.length()==k){
				System.out.println("no");
				return;
			}
			if(msg.charAt(k)==temp.charAt(j)){
				k++;
				j++;
			}
			else
				k++;
		}
		System.out.println("yes");
	}

}


import java.util.ArrayList;
import java.util.Scanner;

public class Main{
	public static void main(String args[]){
        Scanner in=new Scanner(System.in);
        int n=in.nextInt();
        in.nextLine();
        ArrayList<String>a=new ArrayList<String>();
        for(int i=0;i<n;i++)
        	a.add(in.nextLine());
        String after=in.nextLine();
        int pos=0;
        for(int i=0;i<after.length();i++)
        	if(after.charAt(i)=='<'){
        		pos=i;
        		break;
        	}
        after=after.substring(pos+1);
    //    System.out.println(a);
    //    System.out.println(after);
       String test[]=after.split("<");
    //    for(int j=0;j<test.length;j++){
   //     System.out.println(test[j]+" ");
   //     }
   ///     System.out.println();
        boolean has3=false;
        int testPos=0;
        int last = 0;
        for(int i=0;i<test.length;i++){
        	if(test[i].length()>=(a.get(testPos).length()+1)){
        	for(int j=0;j<test[i].length();j++){
        		if(test[i].charAt(j)=='3'){
        			pos=j;
        			has3=true;
        			break;
        		}
        	}
        	if(has3){
        		if(test[i].contains(a.get(testPos))){
        		//	 System.out.println(test[i]+" "+a.get(testPos));
        			testPos++;
        		}

        	}
        	has3=false;
        	}
        	if(testPos==a.size()-1){
        		last=i+1;
        		break;
        	}

        }

        if(last>=test.length||testPos!=a.size()-1)
    		System.out.println("no");
    	else{
    		for(int i=last;i<test.length;i++)
    			for(int j=0;j<test[i].length();j++){
            		if(test[i].charAt(j)=='3'){
            			has3=true;
            			break;
            		}
            	}
    		if(has3)
    			System.out.println("yes");
    		else
    			System.out.println("no");

    	}

 }
}


import java.util.ArrayList;
import java.util.Scanner;

public class Main{
    public static void main(String args[]){
        Scanner in=new Scanner(System.in);
        int n=in.nextInt();
        in.nextLine();
        ArrayList<String>a=new ArrayList<String>();
        for(int i=0;i<n;i++)
            a.add(in.nextLine());
        String after=in.nextLine();
        int pos=0;
       char test[]=after.toCharArray();
        boolean get3=false;
        boolean getLess=false;
        boolean getWord=false;
        int index=0;
        int getLast=-1;
        for(int i=0;i<test.length;){

            for(int j=i;j<test.length;j++)
                if(test[j]=='<'){
                    pos=i;
                    getLess=true;
                    break;
                }
            if(getLess)
            for(int j=pos+1;j<test.length;j++)
                if(test[j]=='3'){
                    pos=i;
                    get3=true;
                    break;
                }
            int  j=0;
            if(get3&&getLess)
                for(int k=pos+1;k<test.length;k++){
                    if(test[k]==a.get(index).charAt(j)){
                        j++;
                        if(j==a.get(index).length()){
                            getWord=true;
                            pos=k+1;

                            break;

                        }

                    }
                }
                if(!get3||!getLess||!getWord){
                    break;
                }
                else{
                    index++;
                    if(index==a.size()){
                       getLast=pos;
                       break;
                    }
                    i=pos;
                }
                get3=false;
                getLess=false;
                getWord=false;

        }
        get3=false;
        getLess=false;
        getWord=false;
        if(getLast!=-1){
            for(int j=pos;j<test.length;j++)
                if(test[j]=='<'){
                    pos=j;
                    getLess=true;
                    break;
                }
            if(getLess)
            for(int j=pos+1;j<test.length;j++)
                if(test[j]=='3'){
                    get3=true;
                    break;
                }
            if(getLess&&get3)
                System.out.println("yes");
            else
                System.out.println("no");

        }else

                System.out.println("no");

        }

 }


import java.util.ArrayList;
import java.util.Scanner;

public class Main {
	public static void main(String args[]){
        Scanner in=new Scanner(System.in);
        int n=in.nextInt();
        in.nextLine();
        ArrayList <int[]>a=new ArrayList<int[]>();
        int []xy;
        int[]b=new int[n];
        for(int i=0;i<n;i++){
        	b[i]=in.nextInt();
        }
        for(int i=0;i+1<n;i++){
        	xy=new int[2];
        	xy[0]=Math.min(b[i], b[i+1]);
        	xy[1]=Math.max(b[i], b[i+1]);
        	a.add(xy);
        }
        boolean find=true;

        for(int i=0;i<a.size();i++){
        	for(int j=i+1;j<a.size();j++){
        		if((a.get(i)[0]<a.get(j)[0]&&a.get(j)[0]<a.get(i)[1]&&a.get(j)[1]>a.get(i)[1])||
        				(a.get(i)[0]>a.get(j)[0]&&a.get(j)[1]>a.get(i)[0]&&a.get(j)[1]<a.get(i)[1])){
        			System.out.println("yes");
        			find=false;
        			break;
        		}
        	}
        	if(!find)
        		break;
        }
        if(find)
        	System.out.println("no");
 }
}


import java.io.BufferedReader;
import java.io.OutputStream;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.PrintWriter;
import java.util.StringTokenizer;
import java.io.InputStream;

/**
 * Built using CHelper plug-in
 * Actual solution is at the top
 */
public class Main {
	public static void main(String[] args) {
		InputStream inputStream = System.in;
		OutputStream outputStream = System.out;
		InputReader in = new InputReader(inputStream);
		PrintWriter out = new PrintWriter(outputStream);
		TaskB solver = new TaskB();
		solver.solve(1, in, out);
		out.close();
	}
}

class TaskB {
    public void solve(int testNumber, InputReader in, PrintWriter out) {
        int n = in.nextInt();
        String s[] = new String[n];
        for(int i=0;i<n;i++){
            in.readLine();
            s[i] = in.next() + "<3";
        }
        in.readLine();
        String v = in.next();
        int wi = 0;
        char nc = '<';
        s[0] = "3" +s[0];
        int si = 0;
        for(int i=0;i<v.length();i++) {
            if(wi == s.length)break;
            if(nc == v.charAt(i)){

                nc = s[wi].charAt(si);

                if(si == s[wi].length()-1){
                    wi++;
                    si = 0;
                }
                else{
                    si++;
                }
            }
        }
        if(wi >= s.length){
            out.println("yes");
        }
        else {
            out.println("no");
        }
    }
}

class InputReader {
    private BufferedReader br;
    private StringTokenizer st;
    public InputReader(InputStream in) {
        br=new BufferedReader(new InputStreamReader(in));
        try {
            st=new StringTokenizer(br.readLine());
        } catch (IOException ignored) {

        }
    }

    public void readLine() {
        try {
            st=new StringTokenizer(br.readLine());
        } catch (IOException e) {
            return;
        }
    }
    public int nextInt(){
        return Integer.parseInt(st.nextToken());
    }

    public String next(){
        return st.nextToken();
    }

}