#include<bits/stdc++.h>

#define LL long long
#define inf 1E20
#define pb push_back
#define vsort(v) sort(v.begin(),v.end())
#define pi acos(-1)
#define inf 2147483647
#define MOD 1073741824
#define MX 50000

using namespace std;
vector<string>V,ans;
int main(){
    ios_base::sync_with_stdio(0);
    cin.tie();
    int n;
    string str;
    cin>>n;
    for(int i=0;i<n;i++){
        cin>>str;
        V.pb(str);
    }
    cin>>str;
    int sz=str.length();
    string tmp="";
    for(int i=0;i<sz-1;i++){
        if(str[i]=='<'){
            if(tmp.size()){
                ans.pb(tmp);
                tmp="";
            }
            while(str[i]!='3') i++;
        }
        else{
            tmp=tmp+str[i];
           // cout<<"df "<<str[i]<<endl;
        }
    }
    if(V.size()==ans.size()){
        int zs=ans.size();
        for(int i=0;i<zs;i++){
            if(V[i]!=ans[i]){
                cout<<"no"<<endl;
                return 0;
            }
        }
        cout<<"yes"<<endl;
    }
    else cout<<"no"<<endl;
    return 0;
}


#include<bits/stdc++.h>

#define LL long long
#define inf 1E20
#define pb push_back
#define vsort(v) sort(v.begin(),v.end())
#define pi acos(-1)
#define clr(a) memset(a,0,sizeof a)
#define bclr(a) memset(a,false,sizeof a)
#define MOD 1073741824
#define MX 1000100

using namespace std;

int main(){
    ios_base::sync_with_stdio(0);
    cin.tie();
    int n;
    string s="<3",str;
    cin>>n;
    for(int i=0;i<n;i++){
        cin>>str;
        s+=str+s;
    }
    cin>>str;
    int sz=str.length(),indx=0;
    for(int i=0;i<sz;i++){
        if(str[i]==s[indx]) indx++;
    }
    if(indx==s.length()) cout<<"yes"<<endl;
    else cout<<"no"<<endl;
    return 0;
}


#include<bits/stdc++.h>

#define LL long long
#define inf 1E20
#define pb push_back
#define vsort(v) sort(v.begin(),v.end())
#define pi acos(-1)
#define clr(a) memset(a,0,sizeof a)
#define bclr(a) memset(a,false,sizeof a)
#define MOD 1073741824
#define MX 1000100

using namespace std;

int main(){
    ios_base::sync_with_stdio(0);
    cin.tie();
    int n;
    string p="<3",str,s=p;
    cin>>n;
    for(int i=0;i<n;i++){
        cin>>str;
        s+=str+p;
    }
    cout<<s<<endl;
    cin>>str;
    int sz=str.length(),indx=0;
    for(int i=0;i<sz;i++){
        if(str[i]==s[indx]) indx++;
    }
    if(indx==s.length()) cout<<"yes"<<endl;
    else cout<<"no"<<endl;
    return 0;
}


#include<bits/stdc++.h>

#define LL long long
#define inf 1E20
#define pb push_back
#define vsort(v) sort(v.begin(),v.end())
#define pi acos(-1)
#define clr(a) memset(a,0,sizeof a)
#define bclr(a) memset(a,false,sizeof a)
#define MOD 1073741824
#define MX 1000100

using namespace std;

int main(){
    ios_base::sync_with_stdio(0);
    cin.tie();
    int n;
    string p="<3",str,s=p;
    cin>>n;
    for(int i=0;i<n;i++){
        cin>>str;
        s+=str+p;
    }
    //cout<<s<<endl;
    cin>>str;
    int sz=str.length(),indx=0;
    for(int i=0;i<sz;i++){
        if(str[i]==s[indx]) indx++;
    }
    if(indx==s.length()) cout<<"yes"<<endl;
    else cout<<"no"<<endl;
    return 0;
}


#include<bits/stdc++.h>

#define LL long long
#define inf 1E20
#define pb push_back
#define vsort(v) sort(v.begin(),v.end())
#define pi acos(-1)
#define inf 2147483647
#define MOD 1073741824
#define MX 50000

using namespace std;
vector<string>V,ans;
int main(){
    ios_base::sync_with_stdio(0);
    cin.tie();
    int n;
    string str;
    cin>>n;
    for(int i=0;i<n;i++){
        cin>>str;
        V.pb(str);
    }
    //sort(V.begin(),V.end());
    cin>>str;
    int sz=str.length();
    string tmp="";
    for(int i=0;i<sz-1;i++){
        if(str[i]=='<'){
            if(tmp.size()){
                ans.pb(tmp);
                tmp="";
            }
            while(str[i]!='3' && i<sz) i++;
        }
        else{
            tmp=tmp+str[i];
           // cout<<"df "<<str[i]<<endl;
        }
    }
    if(tmp.size()) cout<<"no"<<endl;
    else if(V.size()==ans.size()){
        int zs=ans.size();
        for(int i=0;i<zs;i++){
            if(V[i]!=ans[i]){
                cout<<"no"<<endl;
                return 0;
            }
        }
        cout<<"yes"<<endl;
    }
    else cout<<"no"<<endl;
    return 0;
}


#include<bits/stdc++.h>

#define LL long long
#define inf 1E20
#define pb push_back
#define vsort(v) sort(v.begin(),v.end())
#define pi acos(-1)
#define inf 2147483647
#define MOD 1073741824
#define MX 50000

using namespace std;
vector<string>V,ans;
int main(){
    ios_base::sync_with_stdio(0);
    cin.tie();
    int n;
    string str;
    cin>>n;
    for(int i=0;i<n;i++){
        cin>>str;
        V.pb(str);
    }
    sort(V.begin(),V.end());
    cin>>str;
    int sz=str.length();
    string tmp="";
    for(int i=0;i<sz-1;i++){
        if(str[i]=='<'){
            if(tmp.size()){
                ans.pb(tmp);
                tmp="";
            }
            while(str[i]!='3' && i<sz) i++;
        }
        else{
            tmp=tmp+str[i];
        }
    }
    sort(ans.begin(),ans.end());
    if(tmp.size()) cout<<"no"<<endl;
    else if(V.size()==ans.size()){
        int zs=ans.size();
        for(int i=0;i<zs;i++){
            if(V[i]!=ans[i]){
                cout<<"no"<<endl;
                return 0;
            }
        }
        cout<<"yes"<<endl;
    }
    else cout<<"no"<<endl;
    return 0;
}


#include<bits/stdc++.h>
using namespace std;
string s,ss,l;
int n,i,j,we;
int main(){
    ios_base::sync_with_stdio(0);
     cin>>n;
  //  m=0;
    for(i=0;i<n;i++){
       cin>>s;

        ss+="<3"+s;
    }

   ss+="<3";

    cin>>l;
    j=0;
 for(i=0;i<l.length();i++){
        if(ss[j]==l[i]){we++;j++;}
        }
    if(we==ss.length())cout<<"yes"<<endl; else cout<<"no"<<endl;

}


#include<bits/stdc++.h>
using namespace std;
string ss,s,l,op,po;
int i,n,j,we,m;
bool t;

int main(){
    cin>>n;
    m=0;
    op='<';
    po='3';
    for(i=1;i<=n;i++){
       cin>>s;
        ss= ss+s;
    }
    ss=ss+op+po;
    cout<<ss<<endl;
    cin>>l;
    j=0;
    for(i=0;i<l.length();i++){
        if(ss[j]==l[i]){we++;j++;}
        }

if(we==ss.length()) cout<<"yes"<<endl; else cout<<"no"<<endl;
//cout<<ss<<endl;

}


#include<bits/stdc++.h>
using namespace std;
string ss,s,l,op,po;
int i,n,j,we,m;
bool t;

int main(){
    cin>>n;
    m=0;
    op='<';
    po='3';
    for(i=1;i<=n;i++){
       cin>>s;
        ss= ss+s;
    }
    ss=ss+op+po;
    //cout<<ss<<endl;
    cin>>l;
    j=0;
    for(i=0;i<l.length();i++){
        if(ss[j]==l[i]){we++;j++;}
        }

if(we==ss.length()) cout<<"yes"<<endl; else cout<<"no"<<endl;
//cout<<ss<<endl;

}


#include<bits/stdc++.h>
using namespace std;
string ss,s,l;
int i,n,j,we;

int main(){
    cin>>n;
    for(i=0;i<n;i++){
       cin>>s;
        ss=ss+s;
    }
    cin>>l;
    j=0;
    for(i=0;i<l.length();i++){
        if(ss[j]==l[i]){we++;j++;}
    }

if(we==ss.length()) cout<<"YES"<<endl; else cout<<"NO"<<endl;
//cout<<ss<<endl;

}


#include<bits/stdc++.h>
using namespace std;
string s,ss,l;
int n,i,j,we;
int main(){
     cin>>n;
  //  m=0;
    for(i=0;i<n;i++){
       cin>>s;
        ss=ss+'<'+'3'+s;
    }

    ss=ss+'<'+'3';

    cin>>l;
    j=0;
 for(i=0;i<l.length();i++){
        if(ss[j]==l[i]){we++;j++;}
        }
    if(we==ss.length())cout<<"yes"<<endl; else cout<<"no"<<endl;

}


#include<bits/stdc++.h>
using namespace std;
string s,ss,l;
int n,i,j,we;
int main(){
    ios_base::sync_with_stdio(0);
     cin>>n;
  //  m=0;
    for(i=0;i<n;i++){
       cin>>s;
        //ss=ss+'<'+'3'+s;
        ss+="<3"+s;
    }

   // ss=ss+'<'+'3';
   ss+=ss+"<3";

    cin>>l;
    j=0;
 for(i=0;i<l.length();i++){
        if(ss[j]==l[i]){we++;j++;}
        }
    if(we==ss.length())cout<<"yes"<<endl; else cout<<"no"<<endl;

}


#include<bits/stdc++.h>
using namespace std;
string s,ss,l;
int n,i,j,we;
int main(){
    ios_base::sync_with_stdio(0);
     cin>>n;
  //  m=0;
    for(i=0;i<n;i++){
       cin>>s;
        //ss=ss+'<'+'3'+s;
        ss+="<3"+s;
    }

   // ss=ss+'<'+'3';
   ss+="<3";

    cin>>l;
    j=0;
 for(i=0;i<l.length();i++){
        if(ss[j]==l[i]){we++;j++;}
        }
    if(we==ss.length())cout<<"yes"<<endl; else cout<<"no"<<endl;

}


#include<bits/stdc++.h>
using namespace std;
string ss,s,l;
int i,n,j,we,m;
bool t;

int main(){
    cin>>n;
    for(i=0;i<n;i++){
       cin>>s;
        ss=ss+s;
    }
    cin>>l;
    j=0;
    for(i=0;i<l.length();i++){
        if(ss[j]==l[i]){we++;j++;}
        }
    for(i=0;i<l.length();i++){
        if(l[i]=='<') m++;
        if(l[i]=='3') m++;
    }
    m=m/2;

if(we==ss.length()&&(m>n)) cout<<"yes"<<endl; else cout<<"no"<<endl;
//cout<<ss<<endl;

}


#include<bits/stdc++.h>
using namespace std;
string ss,s,l;
int i,n,j,we,m;
bool t;

int main(){
    cin>>n;
    m=0;
    for(i=0;i<n;i++){
       cin>>s;
        ss=ss+s;
    }
    cin>>l;
    j=0;
    for(i=0;i<l.length();i++){
        if(ss[j]==l[i]){we++;j++;}
        }
    for(i=0;i<l.length();i++){
        if(l[i]=='<') m++;
        if(l[i]=='3') m++;
    }
    m=m/2;

if(we==ss.length()&&(m>n)) cout<<"yes"<<endl; else cout<<"no"<<endl;
//cout<<ss<<endl;

}


#include<bits/stdc++.h>
using namespace std;
string ss,s,l;
int i,n,j,we;

int main(){
    cin>>n;
    for(i=0;i<n;i++){
       cin>>s;
        ss=ss+s;
    }
    cin>>l;
    j=0;
    for(i=0;i<l.length();i++){
        if(ss[j]==l[i]){we++;j++;}
    }
if(we==ss.length()) cout<<"yes"<<endl; else cout<<"no"<<endl;
//cout<<ss<<endl;

}


#include<bits/stdc++.h>
using namespace std;
string ss,s,l;
int i,n,j,we,p;
bool t;

int main(){
    cin>>n;
    for(i=0;i<n;i++){
       cin>>s;
        ss=ss+s;
    }
    cin>>l;
    j=0;
    for(i=0;i<l.length();i++){
        if(ss[j]==l[i]){we++;j++;}
        if((l[i]==60)||(l[i]==51))p++;
    }
if(we==ss.length()&&(p/2==n+1)) cout<<"yes"<<endl; else cout<<"no"<<endl;
//cout<<ss<<endl;

}


#include <iostream>
#include <cstdio>
#include <cstring>

using namespace std;

int main(){
    char a[200000],b[100001],x[100001];
    int n;
    scanf("%d", &n);
    int j=0;
    for(int i=0;i<n;){
        a[j]='<',a[j+1]='3',j+=2;
        scanf("%s",x);
        for(int z=0;x[z];z++)
            a[j++]=a[z];
    }
    a[j]='<',a[j+1]='3',j+=2;
    scanf("%s", b);
    int k=0,k2=strlen(b);
    for(int i=0;i<k2;i++){
        if(b[i]==a[k])
            k++;
    }
    if(k==j) printf("yes\n");
    else printf("no\n");
    return 0;
}


#include <iostream>
#include <cstdio>
#include <cstring>

using namespace std;

int main(){
    char a[200000],b[100001];
    int n,cc=0;
    scanf("%d", &n);
    int j=0;
    for(int i=0;i<n+1;){
        char c=getchar();
        if(c==10) i++,a[j++]='<',a[j++]='3';
        else a[j++]=c;
    }
    a[j]='\0';
    scanf("%s", b);
    int k=0,k2=strlen(b);
    for(int i=0;i<k2;i++){
        if(b[i]==a[k])
            k++;
        if(k==j){
            cc=1;
            break;
        }
    }
    if(cc) printf("yes\n");
    else printf("no\n");
    return 0;
}


#include <iostream>
#include <cstdio>
#include <cstring>

using namespace std;

int main(){
    char a[200000],b[100001];
    int n,cc=0;
    scanf("%d", &n);
    int j=0;
    for(int i=0;i<n+1;){
        char c=getchar();
        if(c==10) i++,a[j++]='<',a[j++]='3';
        else a[j++]=c;
    }
    a[j]='\0';
    scanf("%s", b);
    int k=0;
    for(int i=0;i<strlen(b);i++){
        if(b[i]==a[k])
            k++;
        if(k==j){
            cc=1;
            break;
        }
    }
    if(cc) printf("yes\n");
    else printf("no\n");
    return 0;
}


#include <iostream>
#include <cstdio>
#include <cstring>

using namespace std;

char a[1000000],b[100001],x[100001];
int main(){
    int n;
    scanf("%d", &n);
    int j=0;
    for(int i=0;i<n;i++){
        a[j]='<',a[j+1]='3',j+=2;
        scanf("%s",x);
        for(int z=0;x[z];z++)
            a[j++]=a[z];
    }
    a[j]='<',a[j+1]='3',j+=2;
    scanf("%s", b);
    int k=0,k2=strlen(b);
    for(int i=0;i<k2;i++){
        if(b[i]==a[k])
            k++;
    }
    if(k==j) printf("yes\n");
    else printf("no\n");
    return 0;
}


#include <iostream>
#include <cstdio>
#include <cstring>

using namespace std;

int main(){
    char a[200000],b[100001];
    int n,cc=0;
    scanf("%d", &n);
    int j=0;
    for(int i=0;i<n+1;){
        char c=getchar();
        if(c==10) i++,a[j++]='<',a[j++]='3';
        else a[j++]=c;
    }
    a[j]='\0';
    scanf("%s", b);
    int k=0;
    for(int i=0;i<strlen(b);i++){
        if(b[i]==a[k])
            k++;
        if(k+1==j-1){
            cc=1;
            break;
        }
    }
    if(cc) printf("yes\n");
    else printf("no\n");
    return 0;
}


#include <iostream>
#include <cstdio>
#include <cstring>

using namespace std;

    char a[1000000],b[100001];

int main(){
    int n,cc=0;
    scanf("%d", &n);
    int j=0;
    for(int i=0;i<n+1;){
        char c=getchar();
        if(c==10) i++,a[j]='<',a[j+1]='3',j+=2;
        else a[j++]=c;
    }
    scanf("%s", b);
    int k=0,k2=strlen(b);
    for(int i=0;i<k2;i++){
        if(b[i]==a[k])
            k++;
        if(k==j){
            cc=1;
            break;
        }
    }
    if(cc) printf("yes\n");
    else printf("no\n");
    return 0;
}


#include <iostream>
#include <cstdio>
#include <cstring>

using namespace std;

int main(){
    char a[200000],b[100001];
    int n,cc=0;
    scanf("%d", &n);
    int j=0;
    for(int i=0;i<n+1;){
        char c=getchar();
        if(c==10) i++,a[j++]='<',a[j++]='3';
        else a[j++]=c;
    }
    a[j]='\0';
    scanf("%s", b);
    int k=0;
    for(int i=0;i<strlen(b);i++){
        if(b[i]==a[k])
            k++;
        if(k+1==j-1){
            cc=1;
            break;
        }
    }
    if(cc) printf("yes\n");
    else printf("no\n");
    system("PAUSE");
    return 0;
}


#include <iostream>
#include <cstdio>
#include <cstring>

using namespace std;

char a[1000000],b[100001],x[100001];
int main(){
    int n;
    scanf("%d", &n);
    int j=0;
    for(int i=0;i<n;i++){
        a[j]='<',a[j+1]='3',j+=2;
        scanf("%s",x);
        for(int z=0;x[z];z++)
            a[j++]=x[z];
    }
    a[j]='<',a[j+1]='3',j+=2;
    a[j]='\0';
    //printf("%s\n", a);
    scanf("%s", b);
    int k=0,k2=strlen(b);
    for(int i=0;i<k2;i++){
        if(b[i]==a[k])
            k++;
    }
    //printf("%d %d\n", k, j);
    if(k==j) printf("yes\n");
    else printf("no\n");
    //system("PAUSE");
    return 0;
}


#include <iostream>
#include <cstdio>
#include <cstring>

using namespace std;

int main(){
    char a[200000],b[100001];
    int n,cc=0;
    scanf("%d", &n);
    int j=0;
    for(int i=0;i<n+1;){
        char c=getchar();
        if(c==10) i++,a[j]='<',a[j+1]='3',j+=2;
        else a[j++]=c;
    }
    scanf("%s", b);
    int k=0,k2=strlen(b);
    for(int i=0;i<k2;i++){
        if(b[i]==a[k])
            k++;
        if(k==j){
            cc=1;
            break;
        }
    }
    if(cc) printf("yes\n");
    else printf("no\n");
    return 0;
}


#include <iostream>
#include <cstdio>
#include <cstring>

using namespace std;

int main(){
    char a[200000],b[100001];
    int n,cc=0;
    scanf("%d", &n);
    int j=0;
    for(int i=0;i<n+1;){
        char c=getchar();
        if(c==10) i++,a[j++]='<',a[j++]='3';
        else a[j++]=c;
    }
    a[j]='\0';
    scanf("%s", b);
    int k=0;
    for(int i=0;i<strlen(b);i++){
        if(b[i]==a[k])
            k++;
        if(k==j){
            cc=1;
            break;
        }
    }
    if(cc) printf("yes\n");
    else printf("no\n");
    system("PAUSE");
    return 0;
}


#include <iostream>
#include <cstdio>
#include <cstring>

using namespace std;

int main(){
    char a[200000],b[100001];
    int n,cc=0;
    scanf("%d", &n);
    int j=0;
    for(int i=0;i<n+1;){
        char c=getchar();
        if(c==10) i++,a[j++]='<',a[j++]='3';
        else a[j++]=c;
    }
    a[j]='\0';
    scanf("%s", b);
    int k=0;
    for(int i=0;i<strlen(b);i++){
        if(b[i]==a[k])
            k++;
        if(k==j-1){
            cc=1;
            break;
        }
    }
    if(cc) printf("yes\n");
    else printf("no\n");
    return 0;
}


#include <iostream>
#include <cstdio>
#include <cstring>

using namespace std;

int main(){
    char a[200000],b[100001];
    int n;
    scanf("%d", &n);
    int j=0;
    for(int i=0;i<n+1;){
        char c=getchar();
        if(c==10) i++,a[j]='<',a[j+1]='3',j+=2;
        else a[j++]=c;
    }
    scanf("%s", b);
    int k=0,k2=strlen(b);
    for(int i=0;i<k2;i++){
        if(b[i]==a[k])
            k++;
    }
    if(k==j) printf("yes\n");
    else printf("no\n");
    return 0;
}


#include <iostream>
#include <cstdio>
#include <cstdlib>
#include <cstring>
using namespace std;

const int maxin = 1e5 + 10;
const int maxsave = 1e6 + 10;
char a[maxin], b[maxin];
char s[maxsave];

int main()
{
    int i, j, k, n, len1, len2;
    while (scanf("%d", &n) != EOF)
    {
        j = 0;
        s[j++] = '<';
        s[j++] = '3';
        while (n--)
        {
            scanf("%s", a);
            len1 = strlen(a);
            for (i = 0; i < len1; i++)
                s[j++] = a[i];
            s[j++] = '<';
            s[j++] = '3';     // 构造一条对照序列
        }
	//     for (i = 0; i < j; i++)
     //       printf("%c", s[i]);
	//	printf("\n\n");
		char tmp[5];
        scanf("%s", b);
        len2 = strlen(b);
		bool flag = 0;
        int cnt = 0;

        for (k = 0, i = 0; k < j && i < len2; k++, i++)
        {
	//		printf("out: s[%d] = %c\n", k, s[k]);
	//		printf("out: b[%d] = %c\n", i, b[i]);
            if (b[i] != s[k])
            {
		//		printf("b[%d] = %c\n", i, b[i]);
		//		printf("s[%d] = %c\n", k, s[k]);
				if (!flag)
				{
					tmp[0] = b[i];
					flag = 1;
					cnt++;
				}
				if (tmp[0] != b[i])
				{
					cnt++;
					goto H;
				}
				else
				{
					k--;
		//			printf("else same: b[%d] = %c\n", i, b[i]);
		//			printf("else: s[%d] = %c\n", k, s[k]);
				}
            }
        }
H:		if (cnt >= 2)
            printf("no\n");
        else
            printf("yes\n");
    }
    return 0;
}


#include <iostream>
#include <cstdio>
#include <cstdlib>
#include <cstring>
using namespace std;

const int maxin = 1e5 + 10;
const int maxsave = 1e6 + 10;
char a[maxin], b[maxin];
char s[maxsave];

int main()
{
    int i, j, k, n, len1, len2;
    while (scanf("%d", &n) != EOF)
    {
        j = 0;
        s[j++] = '<';
        s[j++] = '3';
        while (n--)
        {
            scanf("%s", a);
            len1 = strlen(a);
            for (i = 0; i < len1; i++)
                s[j++] = a[i];
            s[j++] = '<';
            s[j++] = '3';     // 构造一条对照序列
        }
	//     for (i = 0; i < j; i++)
     //       printf("%c", s[i]);
	//	printf("\n\n");
        getchar();
        gets(b);
        len1 = strlen(b);
        for (k = 0, i = 0; i < len1; i++)
        {
            if (b[i] == s[k])
                k++;
        }
        if (k == j)
            puts("yes");
        else
            puts("no");
    }
    return 0;
}


#include <iostream>
#include <cstdio>
#include <cstdlib>
#include <cstring>
using namespace std;

const int maxin = 1e5 + 10;
const int maxsave = 1e6 + 10;
char a[maxin], b[maxin];
char s[maxsave];

int main()
{
    int i, j, k, n, len1, len2;
    while (scanf("%d", &n) != EOF)
    {
        j = 0;
        while (n--)
        {
            scanf("%s", a);
            len1 = strlen(a);
            for (i = 0; i < len1; i++)
                s[j++] = a[i];
		}
		char tmp[5];
		scanf("%s", b);
		len2 = strlen(b);
		int cnt = 0;
		bool flag = 0;
		if (!(b[len2-1] == '3' && b[len2-2] == '<') || !(b[0] == '<' && b[1] == '3'))
			printf("no\n");
		else
		{
			for (k = i = 0; i < len2; i++)
			{
				while (b[i] == '<' || b[i] == '3' && i < len2)
				{
					i++;
				}
				if (b[i] == s[k] && i < len2)
				{
					if (k < j)
						k++;
				}
				else if (!flag)
				{
					tmp[0] = b[i];
					cnt++;
					flag = 1;
				}
				else if (b[i] != s[k] && i < len2)
				{
					if (tmp[0] != b[i])
					{
		//				printf("tmp[0] = %c\nb[%d] = %c\n", tmp[0], i, b[i]);
						cnt++;
						goto h;
					}
				}
			}
h:			if (cnt >= 2)
				printf("no\n");
			else
				printf("yes\n");
		}
	}
	return 0;
}


#include <iostream>
#include <cstdio>
#include <cstdlib>
#include <cstring>
using namespace std;

const int maxin = 1e5 + 10;
const int maxsave = 1e6 + 10;
char a[maxin], b[maxin];
char s[maxsave];

int main()
{
    int i, j, k, n, len1, len2;
    while (scanf("%d", &n) != EOF)
    {
        j = 0;
        while (n--)
        {
            scanf("%s", a);
            len1 = strlen(a);
            for (i = 0; i < len1; i++)
                s[j++] = a[i];
		}
		s[j++] = '<';
		s[j++] = '3';
		char tmp[5];
		scanf("%s", b);
		len2 = strlen(b);
		int cnt = 0;
		bool flag = 0;
		for (k = i = 0; i < len2; i++)
		{
			while (b[i] == '<' || b[i] == '3' && i < len2)
			{
				i++;
			}
			if (b[i] == s[k] && i < len2)
			{
				if (k < j)
					k++;
			}
			else if (!flag)
			{
				tmp[0] = b[i];
				cnt++;
				flag = 1;
			}
			else if (b[i] != s[k] && i < len2)
			{
				if (tmp[0] != b[i])
				{
		//			printf("tmp[0] = %c\nb[%d] = %c\n", tmp[0], i, b[i]);
					cnt++;
					goto h;
				}
			}
		}
h:		if (cnt >= 2)
			printf("no\n");
		else
			printf("yes\n");
	}
	return 0;
}


#include <iostream>
#include <cstdio>
#include <cstdlib>
#include <cstring>
using namespace std;

const int maxn = 1e6 + 10;
char a[maxn], b[maxn];
char s[maxn];

int main()
{
    int i, j, n, len1, len2;
    while (scanf("%d", &n) != EOF)
    {
        j = 0;
        s[j++] = '<';
        s[j++] = '3';
        while (n--)
        {
            scanf("%s", a);
            len1 = strlen(a);
            for (i = 0; i < len1; i++)
                s[j++] = a[i];
            s[j++] = '<';
            s[j++] = '3';
        }
/*      for (i = 0; i < j; i++)
            printf("%c", s[i]);
    */
        scanf("%s", b);
        len2 = strlen(b);
        int cnt = 0;
        int k = 0;
        for (i = 0; k < j && i < len2; k++, i++)
        {
            if (b[i] != s[k])
            {
        //      printf("b[i] = %c\n", b[i]);
                k--;
                cnt++;
    //          printf("cnt = %d\n", cnt);
            }
            if (cnt >= 2)
                break;
        }
        if (cnt >= 2)
            printf("no\n");
        else
            printf("yes\n");
    }
    return 0;
}


#include <iostream>
#include <cstdio>
#include <cstdlib>
#include <string>
using namespace std;

int main()
{
    int i, j, n, len;
    string str1, str2, tmp;
    tmp = "<3";
    while (scanf("%d", &n) != EOF)
    {
        str1.append(tmp);
        for (i = 0; i < n; i++)
        {
            cin >> str2;
            str1.append(str2);
            str1.append(tmp);
        }
   /*     for (i = 0; i < str1.size(); i++)
            cout << str1[i];
        cout << endl;
        */
   //     cout << "str1 = " << str1 << endl;
        cin >> str2;
        for (j = 0, i = 0; i < str2.size(); i++)
        {
      //      printf("str2[%d]", i);
       //     cout << " = " << str2[i] << endl;
            if (str2[i] == str1[j])
            {
            //    cout << "相同 str2:  " << str2[i] << endl;
                j++;
            }
        /*    else
            {
                cout << "不同 str2: " << str2[i] << endl;
            }  */
        }
        if (j == str1.size())
            puts("yes");
        else
            puts("no");
        str1.clear();
    }
    return 0;
}


#include <iostream>
#include <cstdio>
#include <cstdlib>
#include <cstring>
using namespace std;

const int maxn = 1e6 + 10;
char a[maxn], b[maxn];
char s[maxn];

int main()
{
    int i, j, n, len1, len2;
    while (scanf("%d", &n) != EOF)
    {
        j = 0;
        s[j++] = '<';
        s[j++] = '3';
        while (n--)
        {
            scanf("%s", a);
            len1 = strlen(a);
            for (i = 0; i < len1; i++)
                s[j++] = a[i];
            s[j++] = '<';
            s[j++] = '3';
        }
/*      for (i = 0; i < j; i++)
            printf("%c", s[i]);
    */
        scanf("%s", b);
        len2 = strlen(b);
        int cnt = 0;
        int k = 0;
        for (i = 0; k < j && i < len2; k++, i++)
        {
            if (b[i] != s[k])
            {
        //      printf("b[i] = %c\n", b[i]);
                k--;
                cnt++;
    //          printf("cnt = %d\n", cnt);
            }
        }
        if (cnt >= 2)
            printf("no\n");
        else
            printf("yes\n");
    }
    return 0;
}


#include <iostream>
#include <cstdio>
#include <cstdlib>
#include <cstring>
using namespace std;

const int maxin = 1e5 + 10;
const int maxsave = 1e6 + 10;
char a[maxin], b[maxin];
char s[maxsave];

int main()
{
    int i, j, k, n, len1, len2;
    while (scanf("%d", &n) != EOF)
    {
        j = 0;
        while (n--)
        {
            scanf("%s", a);
            len1 = strlen(a);
            for (i = 0; i < len1; i++)
                s[j++] = a[i];
		}
		s[j++] = '<';
		s[j++] = '3';
		char tmp[5];
		scanf("%s", b);
		len2 = strlen(b);
		int cnt = 0;
		bool flag = 0;
		if (!(b[len2-1] == '3' && b[len2-2] == '<'))
			printf("no\n");
		else
		{
			for (k = i = 0; i < len2; i++)
			{
				while (b[i] == '<' || b[i] == '3' && i < len2)
				{
					i++;
				}
				if (b[i] == s[k] && i < len2)
				{
					if (k < j)
						k++;
				}
				else if (!flag)
				{
					tmp[0] = b[i];
					cnt++;
					flag = 1;
				}
				else if (b[i] != s[k] && i < len2)
				{
					if (tmp[0] != b[i])
					{
		//				printf("tmp[0] = %c\nb[%d] = %c\n", tmp[0], i, b[i]);
						cnt++;
						goto h;
					}
				}
			}
h:			if (cnt >= 2)
				printf("no\n");
			else
				printf("yes\n");
		}
	}
	return 0;
}


/*
Abolfazl Kazemi

BSc in Software Engineering: IAUN Iran
MSc student of Software Engineering: IUST
UVA, topcoder, codeforces, facebook account: AKJ88
*/

#include <cstdio>
#include <iostream>
#include <algorithm>
#include <vector>
#include <climits>
#include <cstring>
#include <cmath>
#include <map>
#include <set>
#include <queue>
#include <functional>
#include <string>

using namespace std;

#define     For(i,a,b)        for (i=a; i<b; i++)
#define     Rep(i,a)          for (i=0; i<a; i++)
#define     FIT(it,v)         for (typeof((v).begin())it=(v).begin(); it!=(v).end(); ++it)
#define     ALL(v)            (v).begin(),(v).end()
#define     Set(a,x)          memset((a),(x),sizeof(a))
#define     EXIST(a,b)        find(ALL(a),(b))!=(a).end()
#define     Sort(x)           sort(ALL(x))
#define     GSORT(x)          sort(ALL(x), greater<typeof(*((x).begin()))>())
#define     UNIQUE(v)         Sort(v); (v).resize(unique(ALL(v)) - (v).begin())
#define     SF                scanf
#define     PF                printf

#define EPS  1e-8
#define PI  acos(-1)
#define MAXN 200005
#define MOD 1000000007
#define INF 1000000000
#define X first
#define Y second

typedef pair<int, int> ii;
typedef pair<double, double> dd;
typedef long long ll;
typedef unsigned long long llu;
typedef vector<int> vi;
typedef vector<ii> vii;
typedef vector<dd> vdd;

char inpWord[MAXN], lastLine[MAXN];
vector<string> allWords;

int main(){
    int n, i, idx, j, countHearts;

#ifndef ONLINE_JUDGE
    freopen("C:\\acm_inp\\358B.in", "r", stdin);
#endif

    SF("%d\n", &n);
    allWords.push_back("<3");
    Rep(i, n){
        gets(inpWord);
        allWords.push_back(inpWord);
        allWords.push_back("<3");
    }
    n = 2*n+1;
    gets(lastLine);
    i = j = idx = 0;

    while( i<n && lastLine[j] ){
        while(lastLine[j] && allWords[i][idx]){
            if(lastLine[j]==allWords[i][idx])
                idx++;
            j ++;
        }
        //if(!allWords[i][idx])
            i ++;
        idx = 0;
    }
    if(i==n)
        PF("yes");
    else
        PF("no");

    return 0;
}

/*
bool checkHeart(int &j){
    if(lastLine[j]=='<')
        j ++;
    else{
        while(lastLine[j] && lastLine[j]!='<')
            j ++;
        if(lastLine[j]=='<')
            j ++;
        else
            return false;
    }

    if(lastLine[j]=='3')
        j ++;
    else{
        while(lastLine[j] && lastLine[j]!='3')
            j ++;
        if(lastLine[j]=='3')
            j ++;
        else
            return false;
    }
    return true;
}

int main(){
    int n, i, idx, j, countHearts;

#ifndef ONLINE_JUDGE
    freopen("C:\\acm_inp\\358B.in", "r", stdin);
#endif

    SF("%d\n", &n);
    //allWords[0] = 0;
    Rep(i, n){
        gets(inpWord);
        allWords.push_back(inpWord);
        //strcat(allWords, inpWord);
        //strcat(allWords, "#");
    }
    gets(lastLine);
    i = j = idx = countHearts = 0;

    while( i<n && lastLine[j] ){
        if(checkHeart(j))
            countHearts ++;
        else{
            PF("no");
            return 0;
        }

        while(lastLine[j] && allWords[i][idx]){
            if(lastLine[j]==allWords[i][idx])
                idx++;
            j ++;
        }
        i ++, idx = 0;
    }
    if(checkHeart(j))
        countHearts ++;
    if(i==n && countHearts==n+1)
        PF("yes");
    else
        PF("no");

    return 0;
}

*/


/*
Abolfazl Kazemi

BSc in Software Engineering: IAUN Iran
MSc student of Software Engineering: IUST
UVA, topcoder, codeforces, facebook account: AKJ88
*/

#include <cstdio>
#include <iostream>
#include <algorithm>
#include <vector>
#include <climits>
#include <cstring>
#include <cmath>
#include <map>
#include <set>
#include <queue>
#include <functional>
#include <string>

using namespace std;

#define     For(i,a,b)        for (i=a; i<b; i++)
#define     Rep(i,a)          for (i=0; i<a; i++)
#define     FIT(it,v)         for (typeof((v).begin())it=(v).begin(); it!=(v).end(); ++it)
#define     ALL(v)            (v).begin(),(v).end()
#define     Set(a,x)          memset((a),(x),sizeof(a))
#define     EXIST(a,b)        find(ALL(a),(b))!=(a).end()
#define     Sort(x)           sort(ALL(x))
#define     GSORT(x)          sort(ALL(x), greater<typeof(*((x).begin()))>())
#define     UNIQUE(v)         Sort(v); (v).resize(unique(ALL(v)) - (v).begin())
#define     SF                scanf
#define     PF                printf

#define EPS  1e-8
#define PI	acos(-1)
#define MAXN 200005
#define MOD 1000000007
#define INF 1000000000
#define X first
#define Y second

typedef pair<int, int> ii;
typedef pair<double, double> dd;
typedef long long ll;
typedef unsigned long long llu;
typedef vector<int> vi;
typedef vector<ii> vii;
typedef vector<dd> vdd;

char inpWord[MAXN], allWords[MAXN], lastLine[MAXN];
bool seenExtraChars;

bool checkHeart(int &j){
	if(lastLine[j]=='<')
		j ++;
	else if(!seenExtraChars){
		seenExtraChars = true;
		while(lastLine[j] && lastLine[j]!='<')
			j ++;
		if(lastLine[j]=='<')
			j ++;
		else
			return false;
	}
	else
		return false;

	if(lastLine[j]=='3')
		j ++;
	else if(!seenExtraChars){
		seenExtraChars = true;
		while(lastLine[j] && lastLine[j]!='3')
			j ++;
		if(lastLine[j]=='3')
			j ++;
		else
			return false;
	}
	else
		return false;
	return true;
}

int main(){
	int n, i, j, countHearts;

#ifndef ONLINE_JUDGE
	freopen("C:\\acm_inp\\358B.in", "r", stdin);
#endif

	SF("%d\n", &n);
	allWords[0] = 0;
	Rep(i, n){
		gets(inpWord);
		strcat(allWords, inpWord);
		strcat(allWords, "#");
	}
	gets(lastLine);
	seenExtraChars = false;
	i = j = countHearts = 0;

	while( allWords[i] && lastLine[j] ){
		if(checkHeart(j))
			countHearts ++;
		else{
			PF("no");
			return 0;
		}

		while(allWords[i]!='#' && lastLine[j]==allWords[i])
			i++, j++;
		if(allWords[i]!='#'){
			if(!seenExtraChars)
				seenExtraChars = true;
			else{
				PF("no");
				return 0;
			}

			while(allWords[i]!='#')
				i ++;
			while(lastLine[j] && lastLine[j]!='<')
				j ++;
		}
		i ++;
	}
	if(checkHeart(j))
		countHearts ++;
	if(!allWords[i] && !lastLine[j] && countHearts==n+1)
		PF("yes");
	else
		PF("no");

	return 0;
}


/*
Abolfazl Kazemi

BSc in Software Engineering: IAUN Iran
MSc student of Software Engineering: IUST
UVA, topcoder, codeforces, facebook account: AKJ88
*/

#include <cstdio>
#include <iostream>
#include <algorithm>
#include <vector>
#include <climits>
#include <cstring>
#include <cmath>
#include <map>
#include <set>
#include <queue>
#include <functional>
#include <string>

using namespace std;

#define     For(i,a,b)        for (i=a; i<b; i++)
#define     Rep(i,a)          for (i=0; i<a; i++)
#define     FIT(it,v)         for (typeof((v).begin())it=(v).begin(); it!=(v).end(); ++it)
#define     ALL(v)            (v).begin(),(v).end()
#define     Set(a,x)          memset((a),(x),sizeof(a))
#define     EXIST(a,b)        find(ALL(a),(b))!=(a).end()
#define     Sort(x)           sort(ALL(x))
#define     GSORT(x)          sort(ALL(x), greater<typeof(*((x).begin()))>())
#define     UNIQUE(v)         Sort(v); (v).resize(unique(ALL(v)) - (v).begin())
#define     SF                scanf
#define     PF                printf

#define EPS  1e-8
#define PI  acos(-1)
#define MAXN 200005
#define MOD 1000000007
#define INF 1000000000
#define X first
#define Y second

typedef pair<int, int> ii;
typedef pair<double, double> dd;
typedef long long ll;
typedef unsigned long long llu;
typedef vector<int> vi;
typedef vector<ii> vii;
typedef vector<dd> vdd;

char inpWord[MAXN], lastLine[MAXN];
vector<string> allWords;

int main(){
    int n, i, idx, j, countHearts;

#ifndef ONLINE_JUDGE
    freopen("C:\\acm_inp\\358B.in", "r", stdin);
#endif

    SF("%d\n", &n);
    allWords.push_back("<3");
    Rep(i, n){
        gets(inpWord);
        allWords.push_back(inpWord);
        allWords.push_back("<3");
    }
    n = 2*n+1;
    gets(lastLine);
    i = j = idx = countHearts = 0;

    while( i<n && lastLine[j] ){
        while(lastLine[j] && allWords[i][idx]){
            if(lastLine[j]==allWords[i][idx])
                idx++;
            j ++;
        }
        i ++, idx = 0;
    }
    if(i==n)
        PF("yes");
    else
        PF("no");

    return 0;
}

/*
bool checkHeart(int &j){
    if(lastLine[j]=='<')
        j ++;
    else{
        while(lastLine[j] && lastLine[j]!='<')
            j ++;
        if(lastLine[j]=='<')
            j ++;
        else
            return false;
    }

    if(lastLine[j]=='3')
        j ++;
    else{
        while(lastLine[j] && lastLine[j]!='3')
            j ++;
        if(lastLine[j]=='3')
            j ++;
        else
            return false;
    }
    return true;
}

int main(){
    int n, i, idx, j, countHearts;

#ifndef ONLINE_JUDGE
    freopen("C:\\acm_inp\\358B.in", "r", stdin);
#endif

    SF("%d\n", &n);
    //allWords[0] = 0;
    Rep(i, n){
        gets(inpWord);
        allWords.push_back(inpWord);
        //strcat(allWords, inpWord);
        //strcat(allWords, "#");
    }
    gets(lastLine);
    i = j = idx = countHearts = 0;

    while( i<n && lastLine[j] ){
        if(checkHeart(j))
            countHearts ++;
        else{
            PF("no");
            return 0;
        }

        while(lastLine[j] && allWords[i][idx]){
            if(lastLine[j]==allWords[i][idx])
                idx++;
            j ++;
        }
        i ++, idx = 0;
    }
    if(checkHeart(j))
        countHearts ++;
    if(i==n && countHearts==n+1)
        PF("yes");
    else
        PF("no");

    return 0;
}

*/


/*
Abolfazl Kazemi

BSc in Software Engineering: IAUN Iran
MSc student of Software Engineering: IUST
UVA, topcoder, codeforces, facebook account: AKJ88
*/

#include <cstdio>
#include <iostream>
#include <algorithm>
#include <vector>
#include <climits>
#include <cstring>
#include <cmath>
#include <map>
#include <set>
#include <queue>
#include <functional>
#include <string>

using namespace std;

#define     For(i,a,b)        for (i=a; i<b; i++)
#define     Rep(i,a)          for (i=0; i<a; i++)
#define     FIT(it,v)         for (typeof((v).begin())it=(v).begin(); it!=(v).end(); ++it)
#define     ALL(v)            (v).begin(),(v).end()
#define     Set(a,x)          memset((a),(x),sizeof(a))
#define     EXIST(a,b)        find(ALL(a),(b))!=(a).end()
#define     Sort(x)           sort(ALL(x))
#define     GSORT(x)          sort(ALL(x), greater<typeof(*((x).begin()))>())
#define     UNIQUE(v)         Sort(v); (v).resize(unique(ALL(v)) - (v).begin())
#define     SF                scanf
#define     PF                printf

#define EPS  1e-8
#define PI  acos(-1)
#define MAXN 200005
#define MOD 1000000007
#define INF 1000000000
#define X first
#define Y second

typedef pair<int, int> ii;
typedef pair<double, double> dd;
typedef long long ll;
typedef unsigned long long llu;
typedef vector<int> vi;
typedef vector<ii> vii;
typedef vector<dd> vdd;

char inpWord[MAXN], lastLine[MAXN];
vector<string> allWords;

int main(){
    int n, i, idx, j, countHearts;

#ifndef ONLINE_JUDGE
    freopen("C:\\acm_inp\\358B.in", "r", stdin);
#endif

    SF("%d\n", &n);
    allWords.push_back("<3");
    Rep(i, n){
        gets(inpWord);
        allWords.push_back(inpWord);
        allWords.push_back("<3");
    }
    n = 2*n+1;
    gets(lastLine);
    i = j = idx = 0;

    while( i<n && lastLine[j] ){
        while(lastLine[j] && allWords[i][idx]){
            if(lastLine[j]==allWords[i][idx])
                idx++;
            j ++;
        }
        if(!allWords[i][idx])
            i ++;
        idx = 0;
    }
    if(i==n)
        PF("yes");
    else
        PF("no");

    return 0;
}

/*
bool checkHeart(int &j){
    if(lastLine[j]=='<')
        j ++;
    else{
        while(lastLine[j] && lastLine[j]!='<')
            j ++;
        if(lastLine[j]=='<')
            j ++;
        else
            return false;
    }

    if(lastLine[j]=='3')
        j ++;
    else{
        while(lastLine[j] && lastLine[j]!='3')
            j ++;
        if(lastLine[j]=='3')
            j ++;
        else
            return false;
    }
    return true;
}

int main(){
    int n, i, idx, j, countHearts;

#ifndef ONLINE_JUDGE
    freopen("C:\\acm_inp\\358B.in", "r", stdin);
#endif

    SF("%d\n", &n);
    //allWords[0] = 0;
    Rep(i, n){
        gets(inpWord);
        allWords.push_back(inpWord);
        //strcat(allWords, inpWord);
        //strcat(allWords, "#");
    }
    gets(lastLine);
    i = j = idx = countHearts = 0;

    while( i<n && lastLine[j] ){
        if(checkHeart(j))
            countHearts ++;
        else{
            PF("no");
            return 0;
        }

        while(lastLine[j] && allWords[i][idx]){
            if(lastLine[j]==allWords[i][idx])
                idx++;
            j ++;
        }
        i ++, idx = 0;
    }
    if(checkHeart(j))
        countHearts ++;
    if(i==n && countHearts==n+1)
        PF("yes");
    else
        PF("no");

    return 0;
}

*/


/*
Abolfazl Kazemi

BSc in Software Engineering: IAUN Iran
MSc student of Software Engineering: IUST
UVA, topcoder, codeforces, facebook account: AKJ88
*/

#include <cstdio>
#include <iostream>
#include <algorithm>
#include <vector>
#include <climits>
#include <cstring>
#include <cmath>
#include <map>
#include <set>
#include <queue>
#include <functional>
#include <string>

using namespace std;

#define     For(i,a,b)        for (i=a; i<b; i++)
#define     Rep(i,a)          for (i=0; i<a; i++)
#define     FIT(it,v)         for (typeof((v).begin())it=(v).begin(); it!=(v).end(); ++it)
#define     ALL(v)            (v).begin(),(v).end()
#define     Set(a,x)          memset((a),(x),sizeof(a))
#define     EXIST(a,b)        find(ALL(a),(b))!=(a).end()
#define     Sort(x)           sort(ALL(x))
#define     GSORT(x)          sort(ALL(x), greater<typeof(*((x).begin()))>())
#define     UNIQUE(v)         Sort(v); (v).resize(unique(ALL(v)) - (v).begin())
#define     SF                scanf
#define     PF                printf

#define EPS  1e-8
#define PI  acos(-1)
#define MAXN 200005
#define MOD 1000000007
#define INF 1000000000
#define X first
#define Y second

typedef pair<int, int> ii;
typedef pair<double, double> dd;
typedef long long ll;
typedef unsigned long long llu;
typedef vector<int> vi;
typedef vector<ii> vii;
typedef vector<dd> vdd;

char inpWord[MAXN], lastLine[MAXN];
vector<string> allWords;

bool checkHeart(int &j){
    if(lastLine[j]=='<')
        j ++;
    else{
        while(lastLine[j] && lastLine[j]!='<')
            j ++;
        if(lastLine[j]=='<')
            j ++;
        else
            return false;
    }

    if(lastLine[j]=='3')
        j ++;
    else{
        while(lastLine[j] && lastLine[j]!='3')
            j ++;
        if(lastLine[j]=='3')
            j ++;
        else
            return false;
    }
    return true;
}

int main(){
    int n, i, idx, j, countHearts;

#ifndef ONLINE_JUDGE
    freopen("C:\\acm_inp\\358B.in", "r", stdin);
#endif

    SF("%d\n", &n);
    //allWords[0] = 0;
    Rep(i, n){
        gets(inpWord);
        allWords.push_back(inpWord);
        //strcat(allWords, inpWord);
        //strcat(allWords, "#");
    }
    gets(lastLine);
    i = j = idx = countHearts = 0;

    while( i<n && lastLine[j] ){
        if(checkHeart(j))
            countHearts ++;
        else{
            PF("no");
            return 0;
        }

        while(lastLine[j] && allWords[i][idx]){
            if(lastLine[j]==allWords[i][idx])
                idx++;
            j ++;
        }
        i ++, idx = 0;
    }
    if(checkHeart(j))
        countHearts ++;
    if(i==n && countHearts==n+1)
        PF("yes");
    else
        PF("no");

    return 0;
}


/*
Abolfazl Kazemi

BSc in Software Engineering: IAUN Iran
MSc student of Software Engineering: IUST
UVA, topcoder, codeforces, facebook account: AKJ88
*/

#include <cstdio>
#include <iostream>
#include <algorithm>
#include <vector>
#include <climits>
#include <cstring>
#include <cmath>
#include <map>
#include <set>
#include <queue>
#include <functional>
#include <string>

using namespace std;

#define     For(i,a,b)        for (i=a; i<b; i++)
#define     Rep(i,a)          for (i=0; i<a; i++)
#define     FIT(it,v)         for (typeof((v).begin())it=(v).begin(); it!=(v).end(); ++it)
#define     ALL(v)            (v).begin(),(v).end()
#define     Set(a,x)          memset((a),(x),sizeof(a))
#define     EXIST(a,b)        find(ALL(a),(b))!=(a).end()
#define     Sort(x)           sort(ALL(x))
#define     GSORT(x)          sort(ALL(x), greater<typeof(*((x).begin()))>())
#define     UNIQUE(v)         Sort(v); (v).resize(unique(ALL(v)) - (v).begin())
#define     SF                scanf
#define     PF                printf

#define EPS  1e-8
#define PI	acos(-1)
#define MAXN 200005
#define MOD 1000000007
#define INF 1000000000
#define X first
#define Y second

typedef pair<int, int> ii;
typedef pair<double, double> dd;
typedef long long ll;
typedef unsigned long long llu;
typedef vector<int> vi;
typedef vector<ii> vii;
typedef vector<dd> vdd;

char inpWord[MAXN], allWords[MAXN], lastLine[MAXN];

bool checkHeart(int &j){
	if(lastLine[j]=='<')
		j ++;
	else{
		while(lastLine[j] && lastLine[j]!='<')
			j ++;
		if(lastLine[j]=='<')
			j ++;
		else
			return false;
	}

	if(lastLine[j]=='3')
		j ++;
	else{
		while(lastLine[j] && lastLine[j]!='3')
			j ++;
		if(lastLine[j]=='3')
			j ++;
		else
			return false;
	}
	return true;
}

int main(){
	int n, i, j, countHearts;

#ifndef ONLINE_JUDGE
	freopen("C:\\acm_inp\\358B.in", "r", stdin);
#endif

	SF("%d\n", &n);
	allWords[0] = 0;
	Rep(i, n){
		gets(inpWord);
		strcat(allWords, inpWord);
		strcat(allWords, "#");
	}
	gets(lastLine);
	i = j = countHearts = 0;

	while( allWords[i] && lastLine[j] ){
		if(checkHeart(j))
			countHearts ++;
		else{
			PF("no");
			return 0;
		}

		while(lastLine[j] && allWords[i]!='#'){
			if(lastLine[j]==allWords[i])
				i++;
			j ++;
		}
		i ++;
	}
	if(checkHeart(j))
		countHearts ++;
	if(!allWords[i] && !lastLine[j] && countHearts==n+1)
		PF("yes");
	else
		PF("no");

	return 0;
}


/*
Abolfazl Kazemi

BSc in Software Engineering: IAUN Iran
MSc student of Software Engineering: IUST
UVA, topcoder, codeforces, facebook account: AKJ88
*/

#include <cstdio>
#include <iostream>
#include <algorithm>
#include <vector>
#include <climits>
#include <cstring>
#include <cmath>
#include <map>
#include <set>
#include <queue>
#include <functional>
#include <string>

using namespace std;

#define     For(i,a,b)        for (i=a; i<b; i++)
#define     Rep(i,a)          for (i=0; i<a; i++)
#define     FIT(it,v)         for (typeof((v).begin())it=(v).begin(); it!=(v).end(); ++it)
#define     ALL(v)            (v).begin(),(v).end()
#define     Set(a,x)          memset((a),(x),sizeof(a))
#define     EXIST(a,b)        find(ALL(a),(b))!=(a).end()
#define     Sort(x)           sort(ALL(x))
#define     GSORT(x)          sort(ALL(x), greater<typeof(*((x).begin()))>())
#define     UNIQUE(v)         Sort(v); (v).resize(unique(ALL(v)) - (v).begin())
#define     SF                scanf
#define     PF                printf

#define EPS  1e-8
#define PI  acos(-1)
#define MAXN 200005
#define MOD 1000000007
#define INF 1000000000
#define X first
#define Y second

typedef pair<int, int> ii;
typedef pair<double, double> dd;
typedef long long ll;
typedef unsigned long long llu;
typedef vector<int> vi;
typedef vector<ii> vii;
typedef vector<dd> vdd;

char inpWord[MAXN], lastLine[MAXN];
char allWords[MAXN][100];

bool checkHeart(int &j){
    if(lastLine[j]=='<')
        j ++;
    else{
        while(lastLine[j] && lastLine[j]!='<')
            j ++;
        if(lastLine[j]=='<')
            j ++;
        else
            return false;
    }

    if(lastLine[j]=='3')
        j ++;
    else{
        while(lastLine[j] && lastLine[j]!='3')
            j ++;
        if(lastLine[j]=='3')
            j ++;
        else
            return false;
    }
    return true;
}

int main(){
    int n, i, idx, j, countHearts;

#ifndef ONLINE_JUDGE
    freopen("C:\\acm_inp\\358B.in", "r", stdin);
#endif

    SF("%d\n", &n);
    //allWords[0] = 0;
    Rep(i, n){
        gets(allWords[i]);
        //strcat(allWords, inpWord);
        //strcat(allWords, "#");
    }
    gets(lastLine);
    i = j = idx = countHearts = 0;

    while( i<n && lastLine[j] ){
        if(checkHeart(j))
            countHearts ++;
        else{
            PF("no");
            return 0;
        }

        while(lastLine[j] && allWords[i][idx]){
            if(lastLine[j]==allWords[i][idx])
                idx++;
            j ++;
        }
        i ++, idx = 0;
    }
    if(checkHeart(j))
        countHearts ++;
    if(i==n && countHearts==n+1)
        PF("yes");
    else
        PF("no");

    return 0;
}


/*
Abolfazl Kazemi

BSc in Software Engineering: IAUN Iran
MSc student of Software Engineering: IUST
UVA, topcoder, codeforces, facebook account: AKJ88
*/

#include <cstdio>
#include <iostream>
#include <algorithm>
#include <vector>
#include <climits>
#include <cstring>
#include <cmath>
#include <map>
#include <set>
#include <queue>
#include <functional>
#include <string>

using namespace std;

#define     For(i,a,b)        for (i=a; i<b; i++)
#define     Rep(i,a)          for (i=0; i<a; i++)
#define     FIT(it,v)         for (typeof((v).begin())it=(v).begin(); it!=(v).end(); ++it)
#define     ALL(v)            (v).begin(),(v).end()
#define     Set(a,x)          memset((a),(x),sizeof(a))
#define     EXIST(a,b)        find(ALL(a),(b))!=(a).end()
#define     Sort(x)           sort(ALL(x))
#define     GSORT(x)          sort(ALL(x), greater<typeof(*((x).begin()))>())
#define     UNIQUE(v)         Sort(v); (v).resize(unique(ALL(v)) - (v).begin())
#define     SF                scanf
#define     PF                printf

#define EPS  1e-8
#define PI	acos(-1)
#define MAXN 200005
#define MOD 1000000007
#define INF 1000000000
#define X first
#define Y second

typedef pair<int, int> ii;
typedef pair<double, double> dd;
typedef long long ll;
typedef unsigned long long llu;
typedef vector<int> vi;
typedef vector<ii> vii;
typedef vector<dd> vdd;

char inpWord[MAXN], allWords[MAXN], lastLine[MAXN];

bool checkHeart(int &j){
	if(lastLine[j]=='<')
		j ++;
	else{
		while(lastLine[j] && lastLine[j]!='<')
			j ++;
		if(lastLine[j]=='<')
			j ++;
		else
			return false;
	}

	if(lastLine[j]=='3')
		j ++;
	else{
		while(lastLine[j] && lastLine[j]!='3')
			j ++;
		if(lastLine[j]=='3')
			j ++;
		else
			return false;
	}
	return true;
}

int main(){
	int n, i, j, countHearts;

#ifndef ONLINE_JUDGE
	freopen("C:\\acm_inp\\358B.in", "r", stdin);
#endif

	SF("%d\n", &n);
	allWords[0] = 0;
	Rep(i, n){
		gets(inpWord);
		strcat(allWords, inpWord);
		strcat(allWords, "#");
	}
	gets(lastLine);
	i = j = countHearts = 0;

	while( allWords[i] && lastLine[j] ){
		if(checkHeart(j))
			countHearts ++;
		else{
			PF("no");
			return 0;
		}

		while(lastLine[j] && allWords[i]!='#'){
			if(lastLine[j]==allWords[i])
				i++;
			j ++;
		}
		i ++;
	}
	if(checkHeart(j))
		countHearts ++;
	if(!allWords[i] && countHearts==n+1)
		PF("yes");
	else
		PF("no");

	return 0;
}


/*
Abolfazl Kazemi

BSc in Software Engineering: IAUN Iran
MSc student of Software Engineering: IUST
UVA, topcoder, codeforces, facebook account: AKJ88
*/

#include <cstdio>
#include <iostream>
#include <algorithm>
#include <vector>
#include <climits>
#include <cstring>
#include <cmath>
#include <map>
#include <set>
#include <queue>
#include <functional>
#include <string>

using namespace std;

#define     For(i,a,b)        for (i=a; i<b; i++)
#define     Rep(i,a)          for (i=0; i<a; i++)
#define     FIT(it,v)         for (typeof((v).begin())it=(v).begin(); it!=(v).end(); ++it)
#define     ALL(v)            (v).begin(),(v).end()
#define     Set(a,x)          memset((a),(x),sizeof(a))
#define     EXIST(a,b)        find(ALL(a),(b))!=(a).end()
#define     Sort(x)           sort(ALL(x))
#define     GSORT(x)          sort(ALL(x), greater<typeof(*((x).begin()))>())
#define     UNIQUE(v)         Sort(v); (v).resize(unique(ALL(v)) - (v).begin())
#define     SF                scanf
#define     PF                printf

#define EPS  1e-8
#define PI	acos(-1)
#define MAXN 200005
#define MOD 1000000007
#define INF 1000000000
#define X first
#define Y second

typedef pair<int, int> ii;
typedef pair<double, double> dd;
typedef long long ll;
typedef unsigned long long llu;
typedef vector<int> vi;
typedef vector<ii> vii;
typedef vector<dd> vdd;

char inpWord[MAXN], lastLine[MAXN];
char allWords[MAXN][100];

bool checkHeart(int &j){
	if(lastLine[j]=='<')
		j ++;
	else{
		while(lastLine[j] && lastLine[j]!='<')
			j ++;
		if(lastLine[j]=='<')
			j ++;
		else
			return false;
	}

	if(lastLine[j]=='3')
		j ++;
	else{
		while(lastLine[j] && lastLine[j]!='3')
			j ++;
		if(lastLine[j]=='3')
			j ++;
		else
			return false;
	}
	return true;
}

int main(){
	int n, i, idx, j, countHearts;

#ifndef ONLINE_JUDGE
	freopen("C:\\acm_inp\\358B.in", "r", stdin);
#endif

	SF("%d\n", &n);
	//allWords[0] = 0;
	Rep(i, n){
		gets(allWords[i]);
		//strcat(allWords, inpWord);
		//strcat(allWords, "#");
	}
	gets(lastLine);
	i = j = idx = countHearts = 0;

	while( i<n && lastLine[j] ){
		if(checkHeart(j))
			countHearts ++;
		else{
			PF("no");
			return 0;
		}

		while(lastLine[j] && allWords[i][idx]){
			if(lastLine[j]==allWords[i][idx])
				idx++;
			j ++;
		}
		i ++;
	}
	if(checkHeart(j))
		countHearts ++;
	if(i==n && countHearts==n+1)
		PF("yes");
	else
		PF("no");

	return 0;
}


# include <math.h>
# include <time.h>
# include <stdio.h>
# include <stdlib.h>
# include <string.h>
# include <stdbool.h>

# define PI 3.1415926536
# define MAXINT 0x7fffffff
# define GetMax(a, b) ((a)>(b)?(a):(b))
# define GetMin(a, b) ((a)<(b)?(a):(b))

# define MAXN 1500009

int main()
{
//    freopen("in", "r", stdin);
    int n, i, j;
    char  string[MAXN], temp[MAXN];
    scanf("%d", &n);
    for(i = j = 0; i <= n; j++)
    {
        scanf("%c", &string[j]);
        if(string[j] == '\n')
        {
            string[j] = '<';
            string[j+1] = '3';
            i++, j++;
        }
    }
    scanf("%s", temp);
    for(i = j = 0; string[j] != '\0' && temp[i] != '\0'; i++)
        if(string[j] == temp[i])
            j++;
    if(string[j])
        printf("no\n");
    else
        printf("yes\n");
    return 0;
}


# include <math.h>
# include <time.h>
# include <stdio.h>
# include <stdlib.h>
# include <string.h>
# include <stdbool.h>

# define PI 3.1415926536
# define MAXINT 0x7fffffff
# define GetMax(a, b) ((a)>(b)?(a):(b))
# define GetMin(a, b) ((a)<(b)?(a):(b))

# define MAXN 100009

int main()
{
//    freopen("in", "r", stdin);
    int n, i, j;
    char  string[MAXN], temp[MAXN];
    scanf("%d", &n);
    for(i = j = 0; i <= n; j++)
    {
        scanf("%c", &string[j]);
        if(string[j] == '\n')
        {
            string[j] = '<';
            string[j+1] = '3';
            i++, j++;
        }
    }
    scanf("%s", temp);
    for(i = j = 0; string[j] != '\0' && temp[i] != '\0'; i++)
        if(string[j] == temp[i])
            j++;
    if(string[j])
        printf("no\n");
    else
        printf("yes\n");
    return 0;
}


# include <math.h>
# include <time.h>
# include <stdio.h>
# include <stdlib.h>
# include <string.h>
# include <stdbool.h>

# define PI 3.1415926536
# define MAXINT 0x7fffffff
# define GetMax(a, b) ((a)>(b)?(a):(b))
# define GetMin(a, b) ((a)<(b)?(a):(b))

# define MAXN 100009

struct Node
{
    char c;
    struct Node *follow;
    struct Node *next;
};

int main()
{
//    freopen("in", "r", stdin);
    int length, n, m, i, j, k, l;
    bool escape, escape1, escape2;
    char temp[MAXN], s[MAXN], ss[MAXN];
    struct Node *head, *p, *pp, *pos;
    scanf("%d", &n);
    getchar();
    head = (struct Node *)malloc(sizeof(struct Node));
    for(i = 0, p = head; i < n; i++)
    {
        pos = (struct Node *)malloc(sizeof(struct Node));
        p->next = pos, p = p->next, pp = p;
        while(scanf("%c", &pp->c) && pp->c != '\n')
            pos = (struct Node *)malloc(sizeof(struct Node)), pp->follow = pos, pp = pp->follow;
        pp ->follow = NULL;
    }
    p->next = NULL;
    scanf("%s", temp);
    length = strlen(temp);
    for(i = 0; i < length; i++)
    {
        if(temp[i] == '<')
            for(j = i+1; j < length && temp[j] != '3'; j++);
        i = j+1;
        break;
    }
    for(escape = true, p = head; i < length;)
    {
        if(escape)
        {
            j = 0, escape1 = escape2 = true;
            p = p->next, pp = p, m = 0;
            while(pp->follow)
            {
                if('a' <= pp->c && pp->c <= 'z')
                    ss[m++] = pp->c;
                pp = pp->follow;
            }
        }
        else
            escape1 = false, escape2 = true;
        escape = false;
        for( ;(escape1 || escape2) && i < length; i++)
        {
            if('a' <= temp[i] && temp[i] <= 'z')
                s[j++] = temp[i];
            if(temp[i] == '<')
                escape1 = false;
            if(temp[i] == '3')
                escape2 = false;
        }
        for(k = l = 0; k < m && l < j; l++)
            if(s[l] == ss[k])
                k++;
        if(k == m)
            escape = true;
    }
    if(escape && p->next == NULL)
        printf("yes\n");
    else
        printf("no\n");
    return 0;
}


# include <math.h>
# include <time.h>
# include <stdio.h>
# include <stdlib.h>
# include <string.h>
# include <stdbool.h>

# define PI 3.1415926536
# define MAXINT 0x7fffffff
# define GetMax(a, b) ((a)>(b)?(a):(b))
# define GetMin(a, b) ((a)<(b)?(a):(b))

# define MAXN 100009

int main()
{
//    freopen("in", "r", stdin);
    int length, n, i, j, m, k, l, h, o;
    bool escape1, escape2;
    char temp[MAXN], string[MAXN], s[MAXN], ss[MAXN];
    scanf("%d", &n);
    for(i = m = 0; i < n; i++)
    {
        scanf("%s", temp);
        strcat(string, temp);
        length = strlen(temp);
        m += length;
        string[m++] = ' ';
        string[m] = '\0';
    }
    scanf("%s", temp);
    length = strlen(temp);
    for(i = 0; i < length; i++)
    {
        if(temp[i] == '<')
        {
            j = i+1;
            while(temp[j] != '3');
            i = j+1;
            break;
        }
    }
    k = o = h = 0;
    while(i < length)
    {
        escape1 = escape2 = true;
        if(o == h)
            j = 0;
        else
            escape1 = false;
        while((escape1 || escape2) && i < length)
        {
            if('a' <= temp[i] && temp[i] <= 'z')
                s[j++] = temp[i];
            if(temp[i] == '<')  escape1 = false;
            if(temp[i] == '3')  escape2 = false;
            i++;
        }
        if(o == h)
        {
            for(l = 0, h = k; h < m && string[h] != ' '; h++)
                ss[l++] = string[h];
            k = h+1;
            h = l;
        }
        for(l = o = 0; l < j && o < h; l++)
        {
            if(ss[o] == s[l])
                o++;
        }
    }

    if(escape1 || escape2 || o != h)
    {
        printf("no\n");
        return 0;
    }
    printf("yes\n");
    return 0;
}


# include <math.h>
# include <time.h>
# include <stdio.h>
# include <stdlib.h>
# include <string.h>
# include <stdbool.h>

# define PI 3.1415926536
# define MAXINT 0x7fffffff
# define GetMax(a, b) ((a)>(b)?(a):(b))
# define GetMin(a, b) ((a)<(b)?(a):(b))

# define MAXN 100009

struct Node
{
    char c;
    struct Node *follow;
    struct Node *next;
};

int main()
{
//    freopen("in", "r", stdin);
    int length, n, m, i, j, k, l;
    bool escape, escape1, escape2;
    char temp[MAXN], s[MAXN], ss[MAXN];
    struct Node *head, *p, *pp, *pos;
    scanf("%d", &n);
    getchar();
    head = (struct Node *)malloc(sizeof(struct Node));
    for(i = 0, p = head; i < n; i++)
    {
        pos = (struct Node *)malloc(sizeof(struct Node));
        p->next = pos, p = p->next, pp = p;
        while(scanf("%c", &pp->c) && pp->c != '\n')
            pos = (struct Node *)malloc(sizeof(struct Node)), pp->follow = pos, pp = pp->follow;
        pp ->follow = NULL;
    }
    p->next = NULL;
    scanf("%s", temp);
    length = strlen(temp);
    for(i = 0; i < length; i++)
    {
        if(temp[i] == '<')
            for(j = i+1; j < length && temp[j] != '3'; j++);
        i = j+1;
        break;
    }
    for(escape = true, p = head; i < length && (p->next) && !(escape1||escape2); )
    {
        if(escape)
        {
            j = 0, escape1 = escape2 = true;
            p = p->next, pp = p, m = 0;
            while(pp->follow)
            {
                if('a' <= pp->c && pp->c <= 'z')
                    ss[m++] = pp->c;
                pp = pp->follow;
            }
        }
        else
            escape1 = false, escape2 = true;
        escape = false;
        for( ;(escape1 || escape2) && i < length; i++)
        {
            if('a' <= temp[i] && temp[i] <= 'z')
                s[j++] = temp[i];
            if(temp[i] == '<')
                escape1 = false;
            if(temp[i] == '3')
                escape2 = false;
        }
        for(k = l = 0; k < m && l < j && !(escape1||escape2); l++)
            if(s[l] == ss[k])
                k++;
        if(k == m)
            escape = true;
    }
    if(escape && p->next == NULL)
        printf("yes\n");
    else
        printf("no\n");
    return 0;
}


# include <math.h>
# include <time.h>
# include <stdio.h>
# include <stdlib.h>
# include <string.h>
# include <stdbool.h>

# define PI 3.1415926536
# define MAXINT 0x7fffffff
# define GetMax(a, b) ((a)>(b)?(a):(b))
# define GetMin(a, b) ((a)<(b)?(a):(b))

# define MAXN 500009

char *stringcpy(char *s, char *p)
{
    while(*p)
        *s++ = *p++;
    *s = '\0';
    return s;
}

int main()
{
//    freopen("in", "r", stdin);
    int n, i, j;
    char  *p, string[MAXN], temp[MAXN], *pp = "<3";
    scanf("%d", &n);
    for(i = 0, p = string; i < n; i++)
    {
        scanf("%s", temp);
        p = stringcpy(p, pp);
        p = stringcpy(p, temp);
    }
    p = stringcpy(p, pp);
    scanf("%s", temp);
    for(i = j = 0; string[j] != '\0' && temp[i] != '\0'; i++)
        if(string[j] == temp[i])
            j++;
    if(string[j])
        printf("no\n");
    else
        printf("yes\n");
    return 0;
}


# include <math.h>
# include <time.h>
# include <stdio.h>
# include <stdlib.h>
# include <string.h>
# include <stdbool.h>

# define PI 3.1415926536
# define MAXINT 0x7fffffff
# define GetMax(a, b) ((a)>(b)?(a):(b))
# define GetMin(a, b) ((a)<(b)?(a):(b))

# define MAXN 100009

int main()
{
//    freopen("in", "r", stdin);
    int length, n, i, j, m;
    char temp[MAXN], s[MAXN], store[MAXN];
    scanf("%d", &n);
    while(n--)
    {
        scanf("%s", s);
        strcat(store, s);
    }
    scanf("%s", temp);
    length = strlen(temp);
    m = strlen(store);
    for(i = j = 0; i < length && j < m; i++)
    {
        if(temp[i] == store[j])
            j++;
    }
    if(j == m)
        printf("yes\n");
    else
        printf("no\n");
    return 0;
}


# include <math.h>
# include <time.h>
# include <stdio.h>
# include <stdlib.h>
# include <string.h>
# include <stdbool.h>

# define PI 3.1415926536
# define MAXINT 0x7fffffff
# define GetMax(a, b) ((a)>(b)?(a):(b))
# define GetMin(a, b) ((a)<(b)?(a):(b))

# define MAXN 100009

int main()
{
//    freopen("in", "r", stdin);
    int length, n, i, j, m, k, l, h, o;
    bool escape1, escape2;
    char temp[MAXN], string[MAXN], s[MAXN], ss[MAXN];
    scanf("%d", &n);
    for(i = m = 0; i < n; i++)
    {
        scanf("%s", temp);
        strcat(string, temp);
        length = strlen(temp);
        m += length;
        string[m++] = ' ';
        string[m] = '\0';
    }
    scanf("%s", temp);
    length = strlen(temp);
    for(i = 0; i < length; i++)
    {
        if(temp[i] == '<')
        {
            j = i+1;
            while(temp[j] != '3');
            i = j+1;
            break;
        }
    }
    k = o = h = 0;
    while(i < length)
    {
        escape1 = escape2 = true;
        if(o == h)
            j = 0;
        else
            escape1 = false;
        while((escape1 || escape2) && i < length)
        {
            if('a' <= temp[i] && temp[i] <= 'z')
                s[j++] = temp[i];
            if(temp[i] == '<')  escape1 = false;
            if(temp[i] == '3')  escape2 = false;
            i++;
        }
        if(o == h)
        {
            for(l = 0, h = k; h < m && string[h] != ' '; h++)
                ss[l++] = string[h];
            k = h+1;
            h = l;
        }
        for(l = o = 0; l < j && o < h; l++)
        {
            if(ss[o] == s[l])
                o++;
        }
    }
    if(escape1 || escape2)
    {
        if(o == h)
        {
            for(l = 0, h = k; h < m && string[h] != ' '; h++)
                ss[l++] = string[h];
            k = h+1;
            h = l;
        }
        for(l = o = 0; l < j && o < h; l++)
        {
            if(ss[o] == s[l])
                o++;
        }
    }
    if(o != h)
    {
        printf("no\n");
        return 0;
    }
    printf("yes\n");
    return 0;
}


# include <math.h>
# include <time.h>
# include <stdio.h>
# include <stdlib.h>
# include <string.h>
# include <stdbool.h>

# define PI 3.1415926536
# define MAXINT 0x7fffffff
# define GetMax(a, b) ((a)>(b)?(a):(b))
# define GetMin(a, b) ((a)<(b)?(a):(b))

# define MAXN 100009

char *stringcpy(char *s, char *p)
{
    while(*p)
        *s++ = *p++;
    *s = '\0';
    return s;
}

int main()
{
//    freopen("in", "r", stdin);
    int n, i, j;
    char  *p, string[MAXN], temp[MAXN], *pp = "<3";
    scanf("%d", &n);
    for(i = 0, p = string; i < n; i++)
    {
        scanf("%s", temp);
        p = stringcpy(p, pp);
        p = stringcpy(p, temp);
    }
    p = stringcpy(p, pp);
    scanf("%s", temp);
    for(i = j = 0; string[j] != '\0' && temp[i] != '\0'; i++)
        if(string[j] == temp[i])
            j++;
    if(string[j])
        printf("no\n");
    else
        printf("yes\n");
    return 0;
}


# include <math.h>
# include <time.h>
# include <stdio.h>
# include <stdlib.h>
# include <string.h>
# include <stdbool.h>

# define PI 3.1415926536
# define MAXINT 0x7fffffff
# define GetMax(a, b) ((a)>(b)?(a):(b))
# define GetMin(a, b) ((a)<(b)?(a):(b))

# define MAXN 300009

int main()
{
//    freopen("in", "r", stdin);
    int n, i, j;
    char  *p, string[MAXN], temp[MAXN];
    scanf("%d", &n);
    for(i = j = 0, p = string; i < n; i++)
    {
        scanf("%s", temp);
        strcpy(p, "<3");
        strcpy(p+2, temp);
        p += strlen(temp) + 2;
    }
    strcpy(p, "<3");
    scanf("%s", temp);
    for(i = j = 0; string[j] != '\0' && temp[i] != '\0'; i++)
        if(string[j] == temp[i])
            j++;
    if(string[j])
        printf("no\n");
    else
        printf("yes\n");
    return 0;
}


# include <math.h>
# include <time.h>
# include <stdio.h>
# include <stdlib.h>
# include <string.h>
# include <stdbool.h>

# define PI 3.1415926536
# define MAXINT 0x7fffffff
# define GetMax(a, b) ((a)>(b)?(a):(b))
# define GetMin(a, b) ((a)<(b)?(a):(b))

# define MAXN 100009

int main()
{
//    freopen("in", "r", stdin);
    int n, i, j;
    char string[MAXN], temp[MAXN];
    scanf("%d", &n);
    for(i = 0; i < n; i++)
    {
        scanf("%s", temp);
        strcat(string, "<3");
        strcat(string, temp);
    }
    strcat(string, "<3");
    scanf("%s", temp);
    for(i = j = 0; string[j] != '\0' && temp[i] != '\0'; i++)
        if(string[j] == temp[i])
            j++;
    if(string[j])
        printf("no\n");
    else
        printf("yes\n");
    return 0;
}


# include <math.h>
# include <time.h>
# include <stdio.h>
# include <stdlib.h>
# include <string.h>
# include <stdbool.h>

# define PI 3.1415926536
# define MAXINT 0x7fffffff
# define GetMax(a, b) ((a)>(b)?(a):(b))
# define GetMin(a, b) ((a)<(b)?(a):(b))

# define MAXN 100009

int main()
{
//    freopen("in", "r", stdin);
    int n, i, j;
    char  *p, string[MAXN], temp[MAXN];
    scanf("%d", &n);
    for(i = j = 0, p = string; i < n; i++)
    {
        scanf("%s", temp);
        strcpy(p, "<3");
        strcpy(p+2, temp);
        p += strlen(temp) + 2;
    }
    strcpy(p, "<3");
    scanf("%s", temp);
    for(i = j = 0; string[j] != '\0' && temp[i] != '\0'; i++)
        if(string[j] == temp[i])
            j++;
    if(string[j])
        printf("no\n");
    else
        printf("yes\n");
    return 0;
}


# include <math.h>
# include <time.h>
# include <stdio.h>
# include <stdlib.h>
# include <string.h>
# include <stdbool.h>

# define PI 3.1415926536
# define MAXINT 0x7fffffff
# define GetMax(a, b) ((a)>(b)?(a):(b))
# define GetMin(a, b) ((a)<(b)?(a):(b))

# define MAXN 1500009

int main()
{
//    freopen("in", "r", stdin);
    int n, i, j;
    char string[MAXN], temp[MAXN];
    scanf("%d", &n);
    for(i = 0; i < n; i++)
    {
        scanf("%s", temp);
        strcat(string, "<3");
        strcat(string, temp);
    }
    strcat(string, "<3");
    scanf("%s", temp);
    for(i = j = 0; string[j] != '\0' && temp[i] != '\0'; i++)
        if(string[j] == temp[i])
            j++;
    if(string[j])
        printf("no\n");
    else
        printf("yes\n");
    return 0;
}


# include <math.h>
# include <time.h>
# include <stdio.h>
# include <stdlib.h>
# include <string.h>
# include <stdbool.h>

# define PI 3.1415926536
# define MAXINT 0x7fffffff
# define GetMax(a, b) ((a)>(b)?(a):(b))
# define GetMin(a, b) ((a)<(b)?(a):(b))

# define MAXN 1500009

int main()
{
//    freopen("in", "r", stdin);
    int n, i, j;
    char  *p, string[MAXN], temp[MAXN];
    scanf("%d", &n);
    for(i = j = 0, p = string; i < n; i++)
    {
        scanf("%s", temp);
        strcpy(p, "<3");
        strcpy(p+2, temp);
        p += strlen(temp) + 2;
    }
    strcpy(p, "<3");
    scanf("%s", temp);
    for(i = j = 0; string[j] != '\0' && temp[i] != '\0'; i++)
        if(string[j] == temp[i])
            j++;
    if(string[j])
        printf("no\n");
    else
        printf("yes\n");
    return 0;
}


# include <math.h>
# include <time.h>
# include <stdio.h>
# include <stdlib.h>
# include <string.h>
# include <stdbool.h>

# define PI 3.1415926536
# define MAXINT 0x7fffffff
# define GetMax(a, b) ((a)>(b)?(a):(b))
# define GetMin(a, b) ((a)<(b)?(a):(b))

# define MAXN 100009

int main()
{
//    freopen("in", "r", stdin);
    int length, n, i, j, m, k, l, h, o;
    bool escape1, escape2;
    char temp[MAXN], string[MAXN], s[MAXN], ss[MAXN];
    scanf("%d", &n);
    for(i = m = 0; i < n; i++)
    {
        scanf("%s", temp);
        strcat(string, temp);
        length = strlen(temp);
        m += length;
        string[m++] = ' ';
        string[m] = '\0';
    }
    scanf("%s", temp);
    length = strlen(temp);
    for(i = 0; i < length; i++)
    {
        if(temp[i] == '<')
        {
            j = i+1;
            while(temp[j] != '3');
            i = j+1;
            break;
        }
    }
    k = 0;
    while(i < length)
    {
        escape1 = escape2 = true;
        j = 0;
        while(escape1 || escape2)
        {
            if('a' <= temp[i] && temp[i] <= 'z')
                s[j++] = temp[i];
            if(temp[i] == '<')  escape1 = false;
            if(temp[i] == '3')  escape2 = false;
            i++;
        }
        for(l = 0, h = k; h < m && string[h] != ' '; h++)
            ss[l++] = string[h];
        k = h+1;
        h = l;
        for(l = o = 0; l < j && o < h; l++)
        {
            if(ss[o] == s[l])
                o++;
        }
        if(o != h)
        {
            printf("no\n");
            return 0;
        }
    }
    printf("yes\n");
    return 0;
}


# include <math.h>
# include <time.h>
# include <stdio.h>
# include <stdlib.h>
# include <string.h>
# include <stdbool.h>

# define PI 3.1415926536
# define MAXINT 0x7fffffff
# define GetMax(a, b) ((a)>(b)?(a):(b))
# define GetMin(a, b) ((a)<(b)?(a):(b))

# define MAXN 100009

int main()
{
//    freopen("in", "r", stdin);
    int length, n, i, j, m, k, l, h, o;
    bool escape1, escape2;
    char temp[MAXN], string[MAXN], s[MAXN], ss[MAXN];
    scanf("%d", &n);
    for(i = m = 0; i < n; i++)
    {
        scanf("%s", temp);
        strcat(string, temp);
        length = strlen(temp);
        m += length;
        string[m++] = ' ';
        string[m] = '\0';
    }
    scanf("%s", temp);
    length = strlen(temp);
    for(i = 0; i < length; i++)
    {
        if(temp[i] == '<')
        {
            j = i+1;
            while(temp[j] != '3');
            i = j+1;
            break;
        }
    }
    k = o = h = 0;
    while(i < length)
    {
        escape1 = escape2 = true;
        if(o == h)
            j = 0;
        else
            escape1 = false;
        while(escape1 || escape2)
        {
            if('a' <= temp[i] && temp[i] <= 'z')
                s[j++] = temp[i];
            if(temp[i] == '<')  escape1 = false;
            if(temp[i] == '3')  escape2 = false;
            i++;
        }
        if(o == h)
        {
            for(l = 0, h = k; h < m && string[h] != ' '; h++)
                ss[l++] = string[h];
            k = h+1;
            h = l;
        }
        for(l = o = 0; l < j && o < h; l++)
        {
            if(ss[o] == s[l])
                o++;
        }

    }
    if(o != h)
    {
        printf("no\n");
        return 0;
    }
    printf("yes\n");
    return 0;
}


# include <math.h>
# include <stdio.h>
# include <stdlib.h>
# include <string.h>
# define MAXN 300009

int main()
{
    int n, i, j;
    char  string[MAXN], temp[MAXN];
    scanf("%d", &n);
    for(i = j = 0; i <= n; j++)
    {
        scanf("%c", &string[j]);
        if(string[j] == '\n')
        {
            string[j] = '<';
            string[j+1] = '3';
            i++, j++;
        }
    }
    scanf("%s", temp);
    for(i = j = 0; string[j] != '\0' && temp[i] != '\0'; i++)
        if(string[j] == temp[i])
            j++;
    if(string[j])
        printf("no\n");
    else
        printf("yes\n");
    return 0;
}


# include <math.h>
# include <time.h>
# include <stdio.h>
# include <stdlib.h>
# include <string.h>
# include <stdbool.h>

# define PI 3.1415926536
# define MAXINT 0x7fffffff
# define GetMax(a, b) ((a)>(b)?(a):(b))
# define GetMin(a, b) ((a)<(b)?(a):(b))

# define MAXN 100009

struct Node
{
    char c;
    struct Node *follow;
    struct Node *next;
};

int main()
{
//    freopen("in", "r", stdin);
    int length, n, m, i, j, k, l;
    bool escape, escape1, escape2;
    char temp[MAXN], s[MAXN], ss[MAXN];
    struct Node *head, *p, *pp, *pos;
    scanf("%d", &n);
    getchar();
    head = (struct Node *)malloc(sizeof(struct Node));
    for(i = 0, p = head; i < n; i++)
    {
        pos = (struct Node *)malloc(sizeof(struct Node));
        p->next = pos, p = p->next, pp = p;
        while(scanf("%c", &pp->c) && pp->c != '\n')
            pos = (struct Node *)malloc(sizeof(struct Node)), pp->follow = pos, pp = pp->follow;
        pp ->follow = NULL;
    }
    p->next = NULL;
    scanf("%s", temp);
    length = strlen(temp);
    for(i = 0; i < length && temp[i] != '<'; i++);
    for(; i < length && temp[i] != '3'; i++);
    for(escape = true, p = head; i < length && (p->next) && !(escape1||escape2); )
    {
        if(escape)
        {
            j = 0, escape1 = escape2 = true;
            p = p->next, pp = p, m = 0;
            while(pp->follow)
            {
                if('a' <= pp->c && pp->c <= 'z')
                    ss[m++] = pp->c;
                pp = pp->follow;
            }
        }
        else
            escape1 = false, escape2 = true;
        escape = false;
        for( ;(escape1 || escape2) && i < length; i++)
        {
            if('a' <= temp[i] && temp[i] <= 'z')
                s[j++] = temp[i];
            if(temp[i] == '<')
                escape1 = false;
            if(temp[i] == '3')
                escape2 = false;
        }
        for(k = l = 0; k < m && l < j && !(escape1||escape2); l++)
            if(s[l] == ss[k])
                k++;
        if(k == m)
            escape = true;
    }
    if(escape && p->next == NULL)
        printf("yes\n");
    else
        printf("no\n");
    return 0;
}


#include<stdio.h>
#include<string.h>
struct node{
    char str[10001];
    int len;
}a[10001];
char ok[111111];
int main(){
    int n;
    while(scanf("%d",&n)!=EOF){
        for(int i=0;i<n;i++){
            scanf("%s",&a[i].str);
            a[i].len=strlen(a[i].str);
        }
        scanf("%s",&ok);
        int len=strlen(ok);
        int nice=0;
        int st=0,ed=0,yes=0,now=0,flag=0,tp=0;
        for(int i=0;i<len;i++){
            if(!flag){
                if(ok[i]=='<')st=1;
                if(ok[i]=='3'&&st==1)st=2;
                if(st==2)flag=1;
            }else
            if(flag==1){
                if(ok[i]==a[now].str[tp]){
                    tp++;
                    if(tp==a[now].len){
                        tp=0,flag=2;
                        //printf("```````%d\n",i);
                    }
                }
            }else if(flag==2){
                if(ok[i]=='<')ed=1;
                if(ok[i]=='3'&&ed==1)yes=1;
                if(yes){
                    now++;
                    if(now==n){
                        nice=1;break;
                    }
                    st=0,ed=0,flag=1,yes=0,tp=0;
                }
            }
        }
        if(nice)printf("yes\n");
        else printf("no\n");
    }
    return 0;
}


#include<iostream>
#include<string.h>
using namespace std;
int main(){
    int n;
    cin>>n;
        string str="<3",ok;
        for(int i=0;i<n;i++){
            cin>>ok;
            str+=ok;
            str+="<3";
        }
        cin>>ok;
        int j=0;
        int len=ok.size(),ed=str.size(),flag=0;
        for(int i=0;i<len;i++){
            if(ok[i]==str[j]){
                j++;
                if(j==ed)break;
            }
        }
        if(j==ed)
        cout<<"yes"<<endl;
        else
        cout<<"no"<<endl;
    return 0;
}


#include<stdio.h>
#include<string.h>
struct node{
    char str[1111];
    int len;
}a[111111];
char ok[111111];
int main(){
    int n;
    while(scanf("%d",&n)!=EOF){
        for(int i=0;i<n;i++){
            scanf("%s",&a[i].str);
            a[i].len=strlen(a[i].str);
        }
        scanf("%s",&ok);
        int len=strlen(ok);
        int nice=0;
        int st=0,ed=0,yes=0,now=0,flag=0,tp=0;
        for(int i=0;i<len;i++){
            if(!flag){
                if(ok[i]=='<')st=1;
                if(ok[i]=='3'&&st==1)st=2;
                if(st==2)flag=1;
            }else
            if(flag==1){
                if(ok[i]==a[now].str[tp]){
                    tp++;
                    if(tp==a[now].len){
                        tp=0,flag=2;
                        //printf("```````%d\n",i);
                    }
                }
            }else if(flag==2){

                if(ok[i]=='<')ed=1;
                if(ok[i]=='3'&&ed==1)yes=1;
                if(yes){
//
                  //  printf("%d .....\n",i);
                   // i-=2;
                    now++;
                    if(now==n){
                        nice=1;break;
                    }
                    st=0,ed=0,flag=1,yes=0,tp=0;
                }
            }
        }
        if(nice)printf("yes\n");
        else printf("no\n");
    }
    return 0;
}


#include<stdio.h>
#include<string.h>
struct ss{
   char str[111];
}a[11111];
int main(){
    char str[11111],n;
    while(scanf("%d",&n)!=EOF){
        int ans=0;
        for(int i=0;i<n;i++){
            scanf("%s",&a[i].str);
            ans+=strlen(a[i].str);
        }
        getchar();
        gets(str);
        int ok=0,tot=0,flag=0;
        int len=strlen(str);
        for(int i=0;i<n;i++){
            int x=strlen(a[i].str);
            for(int j=0;j<x;j++){
                while(str[tot]!=a[i].str[j])tot++;
                if(tot>=len){
                    flag=1;break;
                }
                if(a[i].str[j]==str[tot]){
                   // printf("%c %c %d\n",a[i].str[j],str[tot],tot);
                    ok++;
                }

            }
            if(flag)break;
        }
       // printf("%d %d\n",ans,ok);
        if(ok==ans)printf("yes\n");
        else printf("no\n");
    }
    return 0;
}


#include<iostream>
#include<string.h>
#include<stdio.h>
using namespace std;
int main(){
    int n;
    while(cin>>n){
        string str="",ok;
        for(int i=0;i<n;i++){
            cin>>ok;
            str=str+"<3"+ok;
        }
        str=str+"<3";
        cin>>ok;
        int j=0;
        int len=ok.size(),ed=str.size(),flag=0;
        for(int i=0;i<len;){
            if(ok[i]==str[j]){
                i++,j++;
                if(j==ed){
                    flag=1;break;
                }
            }else i++;
        }
        if(flag)printf("yes\n");
        else printf("no\n");
    }
    return 0;
}


#include<stdio.h>
#include<string.h>
struct node{
    char str[111111];
    int len;
}a[1111];
char ok[111111];
int main(){
    int n;
    while(scanf("%d",&n)!=EOF){
        for(int i=0;i<n;i++){
            scanf("%s",&a[i].str);
            a[i].len=strlen(a[i].str);
        }
        scanf("%s",&ok);
        int len=strlen(ok);
        int nice=0;
        int st=0,ed=0,yes=0,now=0,flag=0,tp=0;
        for(int i=0;i<len;i++){
            if(!flag){
                if(ok[i]=='<')st=1;
                if(ok[i]=='3'&&st==1)st=2;
                if(st==2)flag=1;
            }else
            if(flag==1){
                if(ok[i]==a[now].str[tp]){
                    tp++;
                    if(tp==a[now].len){
                        tp=0,flag=2;
                        //printf("```````%d\n",i);
                    }
                }
            }else if(flag==2){
                if(ok[i]=='<')ed=1;
                if(ok[i]=='3'&&ed==1)yes=1;
                if(yes){
                    now++;
                    if(now==n){
                        nice=1;break;
                    }
                    st=0,ed=0,flag=1,yes=0,tp=0;
                }
            }
        }
        if(nice)printf("yes\n");
        else printf("no\n");
    }
    return 0;
}


#include<iostream>
#include<string.h>
#include<stdio.h>
using namespace std;
int main(){
    int n;
    cin>>n;
        string str="<3",ok;
        for(int i=0;i<n;i++){
            cin>>ok;
            str=str+ok;
            str=str+"<3";
        }
      //  str=str+"<3";
        cin>>ok;
        int j=0;
        int len=ok.size(),ed=str.size(),flag=0;
        for(int i=0;i<len;){
            if(ok[i]==str[j]){
                i++,j++;
                if(j==ed){
                    flag=1;break;
                }
            }else i++;
        }
        if(flag)printf("yes\n");
        else printf("no\n");

    return 0;
}


#include<stdio.h>
#include<string.h>
struct node{
    char str[10001];
    int len;
}a[100001];
char ok[111111];
int main(){
    int n;
    while(scanf("%d",&n)!=EOF){
        for(int i=0;i<n;i++){
            scanf("%s",&a[i].str);
            a[i].len=strlen(a[i].str);
        }
        scanf("%s",&ok);
        int len=strlen(ok);
        int nice=0;
        int st=0,ed=0,yes=0,now=0,flag=0,tp=0;
        for(int i=0;i<len;i++){
            if(!flag){
                if(ok[i]=='<')st=1;
                if(ok[i]=='3'&&st==1)st=2;
                if(st==2)flag=1;
            }else
            if(flag==1){
                if(ok[i]==a[now].str[tp]){
                    tp++;
                    if(tp==a[now].len){
                        tp=0,flag=2;
                        //printf("```````%d\n",i);
                    }
                }
            }else if(flag==2){
                if(ok[i]=='<')ed=1;
                if(ok[i]=='3'&&ed==1)yes=1;
                if(yes){
                    now++;
                    if(now==n){
                        nice=1;break;
                    }
                    st=0,ed=0,flag=1,yes=0,tp=0;
                }
            }
        }
        if(nice)printf("yes\n");
        else printf("no\n");
    }
    return 0;
}


#include<stdio.h>
#include<string.h>
struct node{
    char str[11111];
    int len;
}a[111111];
char ok[111111];
int main(){
    int n;
    while(scanf("%d",&n)!=EOF){
        for(int i=0;i<n;i++){
            scanf("%s",&a[i].str);
            a[i].len=strlen(a[i].str);
        }
        scanf("%s",&ok);
        int len=strlen(ok);
        int nice=0;
        int st=0,ed=0,yes=0,now=0,flag=0,tp=0;
        for(int i=0;i<len;i++){
            if(!flag){
                if(ok[i]=='<')st=1;
                if(ok[i]=='3'&&st==1)st=2;
                if(st==2)flag=1;
            }else
            if(flag==1){
                if(ok[i]==a[now].str[tp]){
                    tp++;
                    if(tp==a[now].len){
                        tp=0,flag=2;
                        //printf("```````%d\n",i);
                    }
                }
            }else if(flag==2){
                if(ok[i]=='<')ed=1;
                if(ok[i]=='3'&&ed==1)yes=1;
                if(yes){
                    now++;
                    if(now==n){
                        nice=1;break;
                    }
                    st=0,ed=0,flag=1,yes=0,tp=0;
                }
            }
        }
        if(nice)printf("yes\n");
        else printf("no\n");
    }
    return 0;
}


#include<iostream>
#include<string.h>
using namespace std;
int main(){
    int n;
    cin>>n;
        string str="<3",ok;
        for(int i=0;i<n;i++){
            cin>>ok;
            str=str+ok;
            str=str+"<3";
        }
        cin>>ok;
        int j=0;
        int len=ok.size(),ed=str.size(),flag=0;
        for(int i=0;i<len;i++){
            if(ok[i]==str[j]){
                j++;
            }
        }
        if(j==ed)
        cout<<"yes"<<endl;
        else
        cout<<"no"<<endl;
    return 0;
}


#include<string>
#include<iostream>
using namespace std;
string s="<3",tmp,s1;
int n,now=0,j=0,last=0;
int main()
{
	cin>>n;
	for(int i=0;i<n;i++){
		cin>>tmp;
		s+=tmp;
		s+="<3";
	}
	cin>>s1;
	int i=0,l1=s.length(),l2=s1.length();
	while(i<l2&&j<l1){
		if(s1[i]==s[j])j++;
		i++;
	}
	if(j==l1)cout<<"yes";
	else cout<<"no";
	return 0;
}


#include<iostream>
#include<string.h>
#include<stdio.h>
using namespace std;
int main(){
    int n;
    cin>>n;
        string str="<3",ok;
        for(int i=0;i<n;i++){
            cin>>ok;
            str=str+ok;
            str=str+"<3";
        }
      //  str=str+"<3";
        cin>>ok;
        int j=0;
        int len=ok.size(),ed=str.size(),flag=0;
        for(int i=0;i<len;i++){
            if(ok[i]==str[j]){
                j++;
            }
        }
        if(j==ed)printf("yes\n");
        else printf("no\n");

    return 0;
}


#include<iostream>
#include<string.h>
using namespace std;
int main(){
    int n;
    cin>>n;
        string str="<3",ok;
        for(int i=0;i<n;i++){
            cin>>ok;
            str=str+ok;
            str=str+"<3";
        }
        cin>>ok;
        int j=0;
        int len=ok.size(),ed=str.size(),flag=0;
        for(int i=0;i<len;i++){
            if(ok[i]==str[j]){
                j++;
                if(j==ed)break;
            }
        }
        if(j==ed)
        cout<<"yes"<<endl;
        else
        cout<<"no"<<endl;
    return 0;
}


#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <cmath>
#include <string>
#include <vector>
#include <iostream>

using namespace std;

const int size = 1e5 + 10;

int main()
{
#ifndef ONLINE_JUDGE
  freopen("in.txt", "r", stdin);
#endif

  int n = 0;

  cin >> n;

  vector<string> words;

  for (int i = 0; i < n + 1; ++i) {
    string x;
    cin >> x;
    words.push_back(x);
  }

  for (int i = 0; i < n; ++i) {
    size_t pos = 0;

    pos = words[n].find(words[i], pos);

    if (pos == string::npos) {
      printf("no");
      return 0;
    }

    if (pos < 2) {
      printf("no");
      return 0;
    }

    if (words[n][pos - 2] != '<' && words[n][pos - 1] != '3') {
      printf("no");
      return 0;
    }
  }

  int len = int(words[n].length());

  if (len < 2) {
    printf("no");
    return 0;
  }

  if (words[n][len - 1] != '3' && words[n][len - 2] != '<') {
    printf("no");
    return 0;
  }

  printf("yes");

  return 0;
}


#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <cmath>
#include <string>
#include <vector>
#include <iostream>

using namespace std;

const int size = 1e5 + 10;

int main()
{
#ifndef ONLINE_JUDGE
  freopen("in.txt", "r", stdin);
#endif

  int n = 0;

  cin >> n;

  vector<string> words;

  for (int i = 0; i < n + 1; ++i) {
    string x;
    cin >> x;
    words.push_back(x);
  }

  size_t pos = 0;

  for (int i = 0; i < n - 1; ++i) {

    pos = words[n].find("<", pos);

    if (pos == string::npos) {
      printf("no");
      return 0;
    }

    pos = words[n].find("3", pos);

    if (pos == string::npos) {
      printf("no");
      return 0;
    }

    for (int j = 0; j < words[i].length(); ++j) {
      pos = words[n].find(words[i][j], pos);

      if (pos == string::npos) {
        printf("no");
        return 0;
      }
    }
  }

  string last = "<3" + words[n - 1] + "<3";

  for (int i = 0; i < last.length(); ++i) {
    pos = words[n].find(last[i], pos);

    if (pos == string::npos) {
      printf("no");
      return 0;
    }
  }

  printf("yes");

  return 0;
}


#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <cmath>
#include <string>
#include <vector>
#include <iostream>

using namespace std;

const int size = 1e5 + 10;

int main()
{
#ifndef ONLINE_JUDGE
  freopen("in.txt", "r", stdin);
#endif

  int n = 0;

  scanf("%d", &n);

  vector<string> words;

  for (int i = 0; i < n + 1; ++i) {
    string x;
    cin >> x;
    words.push_back(x);
  }

  for (int i = 0; i < n - 1; ++i) {
    size_t pos = 0;

    for (int j = 0; j < words[i].length(); ++i) {
      char c = words[i][j];

      pos = words[n].find(c, pos);

      if (pos == string::npos) {
        printf("no");
        return 0;
      }
    }
  }

  printf("yes");

  return 0;
}


#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <cmath>
#include <string>
#include <vector>
#include <iostream>

using namespace std;

const int size = 1e5 + 10;

int main()
{
#ifndef ONLINE_JUDGE
  freopen("in.txt", "r", stdin);
#endif

  int n = 0;

  cin >> n;

  vector<string> words;

  for (int i = 0; i < n + 1; ++i) {
    string x;
    cin >> x;
    words.push_back(x);
  }

  size_t pos = 0;
  size_t prv = -1;

  for (int i = 0; i < n; ++i) {
    string nxt = "<3" + words[i];

    if (i == n - 1) {
      nxt += "<3";
    }

    for (int j = 0; j < nxt.length(); ++j) {
      pos = words[n].find(nxt[j], pos);

      if (pos == prv) {
        pos = words[n].find(nxt[j], pos + 1);
      }

      if (pos == string::npos) {
        printf("no");
        return 0;
      }

      prv = pos;
    }
  }

  printf("yes");

  return 0;
}


#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <cmath>
#include <string>
#include <vector>
#include <iostream>

using namespace std;

const int size = 1e5 + 10;

int main()
{
#ifndef ONLINE_JUDGE
  freopen("in.txt", "r", stdin);
#endif

  int n = 0;

  cin >> n;

  vector<string> words;

  for (int i = 0; i < n + 1; ++i) {
    string x;
    cin >> x;
    words.push_back(x);
  }

  size_t pos = 0;

  for (int i = 0; i < n; ++i) {

    pos = words[n].find("<", pos);

    if (pos == string::npos) {
      printf("no");
      return 0;
    }

    pos = words[n].find("3", pos);

    if (pos == string::npos) {
      printf("no");
      return 0;
    }

    for (int j = 0; j < words[i].length(); ++j) {
      pos = words[n].find(words[i][j], pos);

      if (pos == string::npos) {
        printf("no");
        return 0;
      }
    }
  }

  string last = "<3" + words[n - 1] + "<3";

  for (int i = 0; i < last.length(); ++i) {
    pos = words[n].find(last[i], pos);

    if (pos == string::npos) {
      printf("no");
      return 0;
    }
  }

  printf("yes");

  return 0;
}


#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <cmath>
#include <string>
#include <vector>
#include <iostream>

using namespace std;

const int size = 1e5 + 10;

int main()
{
#ifndef ONLINE_JUDGE
  freopen("in.txt", "r", stdin);
#endif

  int n = 0;

  scanf("%d", &n);

  vector<string> words;

  for (int i = 0; i < n + 1; ++i) {
    string x;
    cin >> x;
    words.push_back(x);
  }

  for (int i = 0; i < n; ++i) {
    size_t pos = 0;

    for (int j = 0; j < words[i].length(); ++i) {
      pos = words[n].find(words[i][j], pos);

      if (pos == string::npos) {
        printf("no");
        return 0;
      }
    }
  }

  printf("yes");

  return 0;
}


#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <cmath>
#include <string>
#include <vector>
#include <iostream>

using namespace std;

const int size = 1e5 + 10;

int main()
{
#ifndef ONLINE_JUDGE
  freopen("in.txt", "r", stdin);
#endif

  int n = 0;

  cin >> n;

  vector<string> words;

  for (int i = 0; i < n + 1; ++i) {
    string x;
    cin >> x;
    words.push_back(x);
  }

  for (int i = 0; i < n; ++i) {
    size_t pos = 0;

    for (int j = 0; j < words[i].length(); ++i) {
      pos = words[n].find(words[i][j], pos);

      if (pos == string::npos) {
        printf("no");
        return 0;
      }
    }
  }

  printf("yes");

  return 0;
}


#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <cmath>
#include <string>
#include <vector>
#include <iostream>

using namespace std;

const int size = 1e5 + 10;

int main()
{
#ifndef ONLINE_JUDGE
  freopen("in.txt", "r", stdin);
#endif

  int n = 0;

  cin >> n;

  vector<string> words;

  for (int i = 0; i < n + 1; ++i) {
    string x;
    cin >> x;
    words.push_back(x);
  }

  size_t pos = 0;

  for (int i = 0; i < n - 1; ++i) {
    string next = "<3" + words[i];

    pos = words[n].find(next, pos);

    if (pos == string::npos) {
      printf("no");
      return 0;
    }
  }

  if (words[n].find("<3" + words[n - 1] + "<3", pos)) {
    printf("yes");
  } else {
    printf("no");
  }

  return 0;
}


#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <cmath>
#include <string>
#include <vector>
#include <iostream>

using namespace std;

const int size = 1e5 + 10;

int main()
{
#ifndef ONLINE_JUDGE
  freopen("in.txt", "r", stdin);
#endif

  int n = 0;

  cin >> n;

  vector<string> words;

  for (int i = 0; i < n + 1; ++i) {
    string x;
    cin >> x;
    words.push_back(x);
  }

  size_t pos = 0;

  for (int i = 0; i < n - 1; ++i) {
    pos = words[n].find("<", pos);

    if (pos == string::npos) {
      printf("no");
      return 0;
    }

    pos = words[n].find("3", pos);

    if (pos == string::npos) {
      printf("no");
      return 0;
    }

    for (int j = 0; j < words[i].length(); ++j) {
      size_t nxt = words[n].find(words[i][j], pos);

      if (nxt == pos) {
        pos = words[n].find(words[i][j], pos + 1);
      }

      if (pos == string::npos) {
        printf("no");
        return 0;
      }
    }
  }

  string last = "<3" + words[n - 1] + "<3";

  for (int i = 0; i < last.length(); ++i) {
    size_t nxt = words[n].find(last[i], pos);

    if (nxt == pos) {
      pos = words[n].find(last[i], pos + 1);
    }

    pos = words[n].find(last[i], pos);

    if (pos == string::npos) {
      printf("no");
      return 0;
    }
  }

  printf("yes");

  return 0;
}


#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <cmath>
#include <string>
#include <vector>
#include <iostream>

using namespace std;

const int size = 1e5 + 10;

int main()
{
#ifndef ONLINE_JUDGE
  freopen("in.txt", "r", stdin);
#endif

  int n = 0;

  cin >> n;

  vector<string> words;

  for (int i = 0; i < n + 1; ++i) {
    string x;
    cin >> x;
    words.push_back(x);
  }

  for (int i = 0; i < n; ++i) {
    size_t pos = 0;

    for (int j = 0; j < words[i].length(); ++j) {
      pos = words[n].find(words[i][j], pos);

      if (pos == string::npos) {
        printf("no");
        return 0;
      }
    }
  }

  printf("yes");

  return 0;
}


#include <stdio.h>
#include <string>
#include <vector>
#include <iostream>

using namespace std;

int main() {
	int n;
	string org = "";
	string text = "";
	char tmp[200000];

	scanf("%d\n", &n);

	for(int i = 0; i < n; i++) {
		gets(tmp);

		org = org + "<3" + tmp;
	}

	org = org + "<3";

	gets(tmp);
	text = tmp;

	for(unsigned int i = 0; i < org.length(); i++) {
		while(text.length() >= org.length() && text[i] != org[i]) {
			//cerr << text[i] << ":" << org[i] << ":" << text.length() << endl;
			text.erase(i, 1);
		}
	}

	if (text.length() >= org.length()) {
		printf("yes");
	}
	else {
		printf("no");
	}

	return 0;
}


#include <stdio.h>
#include <string>
#include <vector>
#include <iostream>

using namespace std;

int main() {
	int n;
	string org = "";
	string text = "";
	char tmp[200000];

	scanf("%d\n", &n);

	for(int i = 0; i < n; i++) {
		gets(tmp);

		org += tmp;
	}

	org = "<3" + org + "<3";

	gets(tmp);
	text = tmp;

	for(int i = 0; i < org.length(); i++) {
		while(text[i] != org[i] && text.length() > i + 1) {
			//cerr << text[i] << ":" << org[i] << ":" << text.length() << endl;
			text.erase(i, 1);
		}
	}

	if (text.length() >= org.length()) {
		printf("yes");
	}
	else {
		printf("no");
	}

	return 0;
}


#include <stdio.h>
#include <string>
#include <vector>
#include <iostream>

using namespace std;

int main() {
	int n;
	string org;
	string text;
	char tmp[100000];

	scanf("%d\n", &n);

	for(int i = 0; i < n; i++) {
		gets(tmp);

		org += tmp;
	}

	gets(tmp);
	text = tmp;

	for(int i = 0; i < org.length(); i++) {
		while(text[i] != org[i] && text.length() > i) {
			//cerr << text[i] << ":" << org[i] << ":" << text.length() << endl;
			text.erase(i, 1);
		}
	}

	if (text.length() >= org.length()) {
		printf("yes");
	}
	else {
		printf("no");
	}

	return 0;
}


#include <stdio.h>
#include <string>
#include <vector>
#include <iostream>

using namespace std;

int main() {
	int n;
	string org;
	string text;
	char tmp[100000];

	scanf("%d\n", &n);

	for(int i = 0; i < n; i++) {
		gets(tmp);

		org += tmp;
	}

	org += "<3";

	gets(tmp);
	text = tmp;

	for(int i = 0; i < org.length(); i++) {
		while(text[i] != org[i] && text.length() > i) {
			//cerr << text[i] << ":" << org[i] << ":" << text.length() << endl;
			text.erase(i, 1);
		}
	}

	if (text.length() >= org.length()) {
		printf("yes");
	}
	else {
		printf("no");
	}

	return 0;
}


#include <stdio.h>
#include <string>
#include <vector>
#include <iostream>

using namespace std;

int main() {
	int n;
	string org = "";
	string text = "";
	char tmp[200000];

	scanf("%d\n", &n);

	for(int i = 0; i < n; i++) {
		gets(tmp);

		org += tmp;
	}

	org = "<3" + org + "<3";

	gets(tmp);
	text = tmp;

	for(unsigned int i = 0; i < org.length(); i++) {
		while(text.length() > i && text[i] != org[i]) {
			//cerr << text[i] << ":" << org[i] << ":" << text.length() << endl;
			text.erase(i, 1);
		}
	}

	if (text.length() >= org.length()) {
		printf("yes");
	}
	else {
		printf("no");
	}

	return 0;
}


#include <stdio.h>
#include <string>
#include <vector>
#include <iostream>

using namespace std;

int main() {
	int n;
	string org;
	string text;
	char tmp[100000];

	scanf("%d\n", &n);

	for(int i = 0; i < n; i++) {
		gets(tmp);

		org += tmp;
	}

	org = "<3" + org + "<3";

	gets(tmp);
	text = tmp;

	for(int i = 0; i < org.length(); i++) {
		while(text[i] != org[i] && text.length() > i) {
			//cerr << text[i] << ":" << org[i] << ":" << text.length() << endl;
			text.erase(i, 1);
		}
	}

	if (text.length() >= org.length()) {
		printf("yes");
	}
	else {
		printf("no");
	}

	return 0;
}


#include <stdio.h>
#include <string>
#include <vector>
#include <iostream>

using namespace std;

int main() {
	int n;
	string org = "";
	string text = "";
	char tmp[200000];

	scanf("%d\n", &n);

	for(int i = 0; i < n; i++) {
		gets(tmp);

		org = org + "<3" + tmp;
	}

	org = org + "<3";

	gets(tmp);
	text = tmp;

	for(unsigned int i = 0; i < org.length(); i++) {
		while(text.length() > i && text[i] != org[i]) {
			//cerr << text[i] << ":" << org[i] << ":" << text.length() << endl;
			text.erase(i, 1);
		}
	}

	if (text.length() >= org.length()) {
		printf("yes");
	}
	else {
		printf("no");
	}

	return 0;
}


#include <stdio.h>
#include <string>
#include <vector>
#include <iostream>

using namespace std;

int main() {
	int n;
	string org = "";
	string text = "";
	char tmp[200000];

	scanf("%d\n", &n);

	for(int i = 0; i < n; i++) {
		gets(tmp);

		org += tmp;
	}

	org = "<3" + org + "<3";

	gets(tmp);
	text = tmp;

	for(int i = 0; i < org.length(); i++) {
		while(text[i] != org[i] && text.length() > i) {
			//cerr << text[i] << ":" << org[i] << ":" << text.length() << endl;
			text.erase(i, 1);
		}
	}

	if (text.length() >= org.length()) {
		printf("yes");
	}
	else {
		printf("no");
	}

	return 0;
}


#include <cstdio>
#include <map>
#include <cstring>
#include <algorithm>

using namespace std;

const int M = 100005;
char tmp[2*M], s[M];
int main()
{
    int n;
    scanf("%d", &n);
    char *p = tmp;
    for(int i = 0; i < n; ++i)
    {
        scanf("%s", p);
        p += (strlen(p));
    }
    scanf("%s", s);
    int len = strlen(s), i, j;
    for(i = 0, j = 0; i < len; ++i)
        if(s[i]==tmp[j]) ++j;
    if(tmp[j]=='\0') puts("yes");
    else puts("no");
    return 0;
}