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

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

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

            if(nc == v.charAt(i)){
                if(wi == s.length){
                    out.println("yes");
                    return;
                }
                nc = s[wi].charAt(si);
                if(si == s[wi].length()-1){
                    wi++;
                    si = 0;
                }
                else{
                    si++;
                }
            }
        }

        out.println("no");

    }
}

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

        }
    }

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

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

}


/*
    Date         : Nov 27, 2013
    Problem Name : dima and text messages
    Location     : http://codeforces.com/contest/358/problem/B
    Algorithm    : bruteforces
    Status       : solving
    CodingTime   : 10:05-
    ReadingTime  :
*/

import java.util.*;
import java.io.*;
public class Main {
    static BufferedReader reader
		= new BufferedReader(new InputStreamReader(System.in));

    public static void main(String[] args) throws Exception{
        int n = Integer.parseInt(reader.readLine());
        String[] words = new String[n];
        for (int i = 0; i < n; i++){
            words[i] = reader.readLine();
        }
        char[] message = reader.readLine().toCharArray();
        int messageInd = 0;
        try {
            for (int  i = 0; i < n; i++){
                // removing <3
                while (message[messageInd] != '<'){
                    messageInd++;
                }
                while (message[messageInd] != '3'){
                    messageInd++;
                }
                char[] word = words[i].toCharArray();
                for (int j = 0; j < word.length; j++){
                    while (word[j] != message[messageInd]){
                        messageInd++;
                    }
                    messageInd++;
                }
            }
            while (message[messageInd] != '<'){
                messageInd++;
            }
            while (message[messageInd] != '3'){
                messageInd++;
            }
        } catch (Exception e){
            System.out.println("no");
            return;
        }
        System.out.println("yes");
        return;

    }
}


/*
    Date         : Nov 27, 2013
    Problem Name : dima and text messages
    Location     : http://codeforces.com/contest/358/problem/B
    Algorithm    : bruteforces
    Status       : solving
    CodingTime   : 10:05-
    ReadingTime  :
*/

import java.util.*;
import java.io.*;
public class Main {
    static BufferedReader reader
		= new BufferedReader(new InputStreamReader(System.in));

    public static void main(String[] args) throws Exception{
        int n = Integer.parseInt(reader.readLine());
        String[] words = new String[n];
        for (int i = 0; i < n; i++){
            words[i] = reader.readLine();
        }
        char[] message = reader.readLine().toCharArray();
        int messageInd = 0;
        try {
            for (int  i = 0; i < n; i++){
                // removing <3
                while (message[messageInd] == '<'){
                    messageInd++;
                }
                while (message[messageInd] == '3'){
                    messageInd++;
                }
                char[] word = words[i].toCharArray();
                for (int j = 0; j < word.length; j++){
                    while (word[j] != message[messageInd]){
                        messageInd++;
                    }
                }
            }
            while (message[messageInd] == '<'){
                messageInd++;
            }
            while (message[messageInd] == '3'){
                messageInd++;
            }
        } catch (Exception e){
            System.out.println("no");
            return;
        }
        System.out.println("yes");
        return;

    }
}


/*
    Date         : Nov 27, 2013
    Problem Name : dima and text messages
    Location     : http://codeforces.com/contest/358/problem/B
    Algorithm    : bruteforces
    Status       : solving
    CodingTime   : 10:05-
    ReadingTime  :
*/

import java.util.*;
import java.io.*;
public class Main {
    static BufferedReader reader
		= new BufferedReader(new InputStreamReader(System.in));

    public static void main(String[] args) throws Exception{
        int n = Integer.parseInt(reader.readLine());
        String[] words = new String[n];
        for (int i = 0; i < n; i++){
            words[i] = reader.readLine();
        }
        char[] message = reader.readLine().toCharArray();
        int messageInd = 0;
        try {
            for (int  i = 0; i < n; i++){
                // removing <3
                while (message[messageInd] != '<'){
                    messageInd++;
                }
                while (message[messageInd] != '3'){
                    messageInd++;
                }
                char[] word = words[i].toCharArray();
                for (int j = 0; j < word.length; j++){
                    while (word[j] != message[messageInd]){
                        messageInd++;
                    }
                }
            }
            while (message[messageInd] != '<'){
                messageInd++;
            }
            while (message[messageInd] != '3'){
                messageInd++;
            }
        } catch (Exception e){
            System.out.println("no");
            return;
        }
        System.out.println("yes");
        return;

    }
}


/*
    Date         : Nov 27, 2013
    Problem Name : dima and text messages
    Location     : http://codeforces.com/contest/358/problem/B
    Algorithm    : bruteforces
    Status       : solving
    CodingTime   : 10:05-
    ReadingTime  :
*/

import java.util.*;
import java.io.*;
public class Main {
    static BufferedReader reader
		= new BufferedReader(new InputStreamReader(System.in));

    public static void main(String[] args) throws Exception{
        int n = Integer.parseInt(reader.readLine());
        String[] words = new String[n];
        for (int i = 0; i < n; i++){
            words[i] = reader.readLine();
        }
        char[] message = reader.readLine().toCharArray();
        int messageInd = 0;
        try {
            for (int  i = 0; i < n; i++){
                // removing <3
                while (message[messageInd] == '<'){
                    messageInd++;
                }
                while (message[messageInd] == '3'){
                    messageInd++;
                }
                char[] word = words[i].toCharArray();
                for (int j = 0; j < word.length; j++){
                    while (word[j] != message[messageInd]){
                        messageInd++;
                    }
                }
            }
        } catch (Exception e){
            System.out.println("no");
            return;
        }
        System.out.println("yes");
        return;

    }
}


import java.io.BufferedReader;
import java.io.BufferedWriter;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.OutputStreamWriter;
import java.io.PrintWriter;
import java.util.regex.Matcher;
import java.util.regex.Pattern;

public class C358B {

	public static void main(String[] args) throws IOException {
		BufferedReader bf = new BufferedReader(new InputStreamReader(System.in));
		PrintWriter pw = new PrintWriter(new BufferedWriter(new OutputStreamWriter(System.out)));
		int n = Integer.parseInt(bf.readLine().trim());
		String[] s = new String[n];
		for (int i = 0; i < n; i++) {
			s[i] = bf.readLine().trim();
		}
		String sms = bf.readLine().trim();
		int pos = 0, curPos = 0, length = sms.length();
		int index = 0, w, begin = 0;
		String substr;
		boolean error = true;
		int count = 0;
		while(true){
			if (begin == 0)
				w = sms.indexOf(s[index]);
			else
				w = sms.substring(begin).indexOf(s[index]);
			if (w < 0) {
				break;
			} else {
				substr = sms.substring(0, w + begin);
				if (substr.indexOf("<") < substr.indexOf("3")){
					pos = w + s[index].length();
					curPos = w + s[index].length();
					index++;
					begin = 0;
				} else {
					curPos = 0;
					begin += w + 1;
				}
			}
			if (curPos != 0)
				sms = sms.substring(curPos);
			if (pos == length || index == n) break;
		}
		if (n == index && pos < length && sms.indexOf("<") < sms.lastIndexOf("3")){
			error = false;
		}

		if (error) pw.println("no");
		else System.out.println("yes");

		pw.close();
		bf.close();
	}

}


import java.io.BufferedReader;
import java.io.BufferedWriter;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.OutputStreamWriter;
import java.io.PrintWriter;

public class C358B {

	public static void main(String[] args) throws IOException {
		BufferedReader bf = new BufferedReader(new InputStreamReader(System.in));
		PrintWriter pw = new PrintWriter(new BufferedWriter(new OutputStreamWriter(System.out)));
		int n = Integer.parseInt(bf.readLine().trim());
		String[] s = new String[2 * n + 1];
		int count = 0;
		s[count++] = "<3";
		for (int i = 0; i < n; i++) {
			s[count++] = bf.readLine().trim();
			s[count++] = "<3";
		}
		String sms = bf.readLine().trim();
		int index = 0, pos = 0;
		for (int i = 0; i < sms.length(); i++) {
			if (s[index].charAt(pos) == sms.charAt(i)){
				pos++;
				if (s[index].length() == pos) {
					index++;
					pos = 0;
					if (index == count) {
						break;
					}
				}
			}
		}
		if (index == count) pw.println("yes");
		else pw.println("no");
		pw.close();
	}
}


import java.io.BufferedReader;
import java.io.BufferedWriter;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.OutputStreamWriter;
import java.io.PrintWriter;
import java.util.regex.Matcher;
import java.util.regex.Pattern;

public class C358B {

	public static void main(String[] args) throws IOException {
		BufferedReader bf = new BufferedReader(new InputStreamReader(System.in));
		PrintWriter pw = new PrintWriter(new BufferedWriter(new OutputStreamWriter(System.out)));
		int n = Integer.parseInt(bf.readLine().trim());
		String[] s = new String[n];
		for (int i = 0; i < n; i++) {
			s[i] = bf.readLine().trim();
		}
		String sms = bf.readLine().trim();
		int pos = 0, curPos = 0, length = sms.length();
		int index = 0, w, begin = 0;
		String substr;
		boolean error = true;
		int count = 0;
		while(true){
			if (begin == 0)
				w = sms.indexOf(s[index]);
			else
				w = sms.substring(begin).indexOf(s[index]);
			if (w < 0) {
				break;
			} else {
				substr = sms.substring(0, w + begin);
				if (substr.indexOf("<") < substr.indexOf("3")){
					pos = w + s[index].length();
					curPos = begin + w + s[index].length();
					index++;
					begin = 0;
				} else {
					curPos = 0;
					begin += w + 1;
				}
			}
			if (curPos != 0)
				sms = sms.substring(curPos);
			if (pos == length || index == n) break;
		}
		if (n == index && pos < length && sms.indexOf("<") < sms.lastIndexOf("3")){
			error = false;
		}

		if (error) pw.println("no");
		else System.out.println("yes");

		pw.close();
		bf.close();
	}

}


import java.io.BufferedReader;
import java.io.BufferedWriter;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.OutputStreamWriter;
import java.io.PrintWriter;
import java.util.regex.Matcher;
import java.util.regex.Pattern;

public class C358B {

	public static void main(String[] args) throws IOException {
		BufferedReader bf = new BufferedReader(new InputStreamReader(System.in));
		PrintWriter pw = new PrintWriter(new BufferedWriter(new OutputStreamWriter(System.out)));
		int n = Integer.parseInt(bf.readLine().trim());
		String[] s = new String[n];
		for (int i = 0; i < n; i++) {
			s[i] = bf.readLine().trim();
		}
		String sms = bf.readLine().trim();
//		int pos = 0, curPos = 0, length = sms.length();
//		int index = 0, w, begin = 0;
//		String substr;
//		boolean error = true;
//		int count = 0;
//		while(true){
//			if (begin == 0)
//				w = sms.indexOf(s[index]);
//			else
//				w = sms.substring(begin).indexOf(s[index]);
//			if (w < 0) {
//				break;
//			} else {
//				substr = sms.substring(0, w + begin);
//				if (substr.indexOf("<") < substr.indexOf("3")){
//					pos = w + s[index].length();
//					curPos = begin + w + s[index].length() - 1;
//					index++;
//					begin = 0;
//				} else {
//					curPos = 0;
//					begin += w + 1;
//				}
//			}
//			if (curPos != 0)
//				sms = sms.substring(curPos);
//			System.out.println(sms);
//			if (pos == length || index == n) break;
//		}
//		if (n == index && pos < length && sms.indexOf("<") < sms.lastIndexOf("3")){
//			error = false;
//		}
//
//		if (error) pw.println("no");
//		else System.out.println("yes");
		String pattern = "";
		for (int i = 0; i < n; i++) {
			pattern = pattern + "([0-9\\<\\>a-z]*)\\<([0-9\\<\\>a-z]*)3([0-9\\<\\>a-z]*)" + s[i] + "([0-9\\<\\>a-z]*)";
		}

		if (pregMatch(pattern, sms)){
			pw.println("yes");
		} else {
			pw.println("no");
		}

		pw.close();
		bf.close();
	}

   public static boolean pregMatch(String pattern, String content) {
       Pattern p = Pattern.compile(pattern);
       Matcher m = p.matcher(content);
       boolean b = m.matches();
       return b;
   }

}


import java.io.BufferedReader;
import java.io.BufferedWriter;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.OutputStreamWriter;
import java.io.PrintWriter;
import java.util.regex.Matcher;
import java.util.regex.Pattern;

public class C358B {

	public static void main(String[] args) throws IOException {
		BufferedReader bf = new BufferedReader(new InputStreamReader(System.in));
		PrintWriter pw = new PrintWriter(new BufferedWriter(new OutputStreamWriter(System.out)));
		int n = Integer.parseInt(bf.readLine().trim());
		String[] s = new String[n];
		for (int i = 0; i < n; i++) {
			s[i] = bf.readLine().trim();
		}
		String sms = bf.readLine().trim();
//		int pos = 0, curPos = 0, length = sms.length();
//		int index = 0, w, begin = 0;
//		String substr;
//		boolean error = true;
//		int count = 0;
//		while(true){
//			if (begin == 0)
//				w = sms.indexOf(s[index]);
//			else
//				w = sms.substring(begin).indexOf(s[index]);
//			if (w < 0) {
//				break;
//			} else {
//				substr = sms.substring(0, w + begin);
//				if (substr.indexOf("<") < substr.indexOf("3")){
//					pos = w + s[index].length();
//					curPos = begin + w + s[index].length() - 1;
//					index++;
//					begin = 0;
//				} else {
//					curPos = 0;
//					begin += w + 1;
//				}
//			}
//			if (curPos != 0)
//				sms = sms.substring(curPos);
//			System.out.println(sms);
//			if (pos == length || index == n) break;
//		}
//		if (n == index && pos < length && sms.indexOf("<") < sms.lastIndexOf("3")){
//			error = false;
//		}
//
//		if (error) pw.println("no");
//		else System.out.println("yes");
		String pattern = "";
		for (int i = 0; i < n; i++) {
			pattern += "([0-9\\<\\>a-z]*)\\<([0-9\\<\\>a-z]*)3([0-9\\<\\>a-z]*)" + s[i] + "([0-9\\<\\>a-z]*)";
		}
		pattern += "\\<([0-9\\<\\>a-z]*)3([0-9\\<\\>a-z]*)";

		if (pregMatch(pattern, sms)){
			pw.println("yes");
		} else {
			pw.println("no");
		}

		pw.close();
		bf.close();
	}

   public static boolean pregMatch(String pattern, String content) {
       Pattern p = Pattern.compile(pattern);
       Matcher m = p.matcher(content);
       boolean b = m.matches();
       return b;
   }

}


import java.io.BufferedReader;
import java.io.BufferedWriter;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.OutputStreamWriter;
import java.io.PrintWriter;

public class C358B {

	public static void main(String[] args) throws IOException {
		BufferedReader bf = new BufferedReader(new InputStreamReader(System.in));
		PrintWriter pw = new PrintWriter(new BufferedWriter(new OutputStreamWriter(System.out)));
		int n = Integer.parseInt(bf.readLine().trim());
		String[] s = new String[2 * n + 1];
		int count = 0;
		s[count++] = "<3";
		for (int i = 0; i < n; i++) {
			s[count++] = bf.readLine().trim();
			s[count++] = "<3";
		}
		String sms = bf.readLine().trim();
		int index = 0, pos = 0;
		for (int i = 0; i < sms.length(); i++) {
			if (s[index].charAt(pos) == sms.charAt(i)){
				pos++;
				if (s[index].length() == pos) {
					index++;
					pos = 0;
					if (index == n) {
						break;
					}
				}
			}
		}
		if (index == n) pw.println("yes");
		else pw.println("no");
		pw.close();
	}
}


import java.io.BufferedReader;
import java.io.BufferedWriter;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.OutputStreamWriter;
import java.io.PrintWriter;
import java.util.regex.Matcher;
import java.util.regex.Pattern;

public class C358B {

	public static void main(String[] args) throws IOException {
		BufferedReader bf = new BufferedReader(new InputStreamReader(System.in));
		PrintWriter pw = new PrintWriter(new BufferedWriter(new OutputStreamWriter(System.out)));
		int n = Integer.parseInt(bf.readLine().trim());
		String[] s = new String[n];
		for (int i = 0; i < n; i++) {
			s[i] = bf.readLine().trim();
		}
		String sms = bf.readLine().trim();
		String ans = "<3";
		for (int i = 0; i < n; i++) {
			ans += s[i] + "<3";
		}
		int pos = 0;
		for (int i = 0; i < sms.length(); i++) {
			if (sms.charAt(i) == ans.charAt(pos)){
				pos++;
				if (pos == ans.length()) break;
			}
		}
		if (pos == ans.length()) pw.println("yes");
		else pw.println("no");
		pw.close();
		bf.close();
	}
}


import java.io.BufferedReader;
import java.io.BufferedWriter;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.OutputStreamWriter;
import java.io.PrintWriter;

public class C358B {

	public static void main(String[] args) throws IOException {
		BufferedReader bf = new BufferedReader(new InputStreamReader(System.in));
		PrintWriter pw = new PrintWriter(new BufferedWriter(new OutputStreamWriter(System.out)));
		int n = Integer.parseInt(bf.readLine().trim());
		String[] s = new String[2 * n + 1];
		int count = 0;
		s[count++] = "<3";
		for (int i = 0; i < n; i++) {
			s[count++] = bf.readLine().trim();
			s[count++] = "<3";
		}
		String sms = bf.readLine().trim();
		int index = 0, pos = 0;
		for (int i = 0; i < sms.length(); i++) {
			if (s[index].charAt(pos) == sms.charAt(i)){
				pos++;
				if (s[index].length() == pos) {
					index++;
					pos = 0;
					if (index == count) {
						break;
					}
				}
			}
		}
		if (index == n) pw.println("yes");
		else pw.println("no");
		pw.close();
	}
}


import java.util.Scanner;

public class B {
    public static void main(String[] args){
        Scanner sc = new Scanner(System.in);

        int n = sc.nextInt();
        sc.nextLine();
        String[] words = new String[2*n+1];
        for(int i = 0; i< 2*n; i+=2){
            words[i] = "<3";
            words[i+1] = sc.nextLine();
        }
        words[2*n] = "<3";

        boolean ok = false;
        String msg = sc.nextLine();
        int point = 0;
        for(int i = 0; i <2*n+1; i++){
            int index = 0;
            while(point < msg.length() && index < words[i].length()){
                if(words[i].charAt(index) == msg.charAt(point)){
                    point++;
                    index++;
                }
                else{
                    point++;
                }
            }
            if(index == words[i].length() && i == 2*n){
                ok = true;
                continue;
            }
        }
        if(ok){
            System.out.println("yes");
        }
        else{
            System.out.println("no");
        }
    }
}


import java.io.*;
import java.util.ArrayList;
import java.util.Locale;

public class Solution implements Runnable {

    static BufferedReader in;
    static PrintWriter out;

    public static void main(String[] args) {
        new Thread(null, new Solution(), "", 256 * (1L << 20)).start();
    }

    public void run() {
        try {
            long t1 = System.currentTimeMillis();
            if (System.getProperty("ONLINE_JUDGE") != null) {
                out = new PrintWriter(System.out);
                in = new BufferedReader(new InputStreamReader(System.in));
            } else {
                out = new PrintWriter("output.txt");
                in = new BufferedReader(new FileReader("input.txt"));
            }
            Locale.setDefault(Locale.US);
            solve();
            long t2 = System.currentTimeMillis();
            System.err.println("Time = " + (t2 - t1));
        } catch (Throwable t) {
            t.printStackTrace(System.err);
            System.exit(-1);
        } finally {
            try {
                in.close();
                out.close();
            } catch (IOException e) {
                e.printStackTrace();
                System.exit(-1);
            }
        }
    }

    // solution
    void solve() throws IOException {
        String line = in.readLine();
        int wordCount;
        ArrayList<String> words = new ArrayList<String>();
        ArrayList<String> delimiters = new ArrayList<String>();
        String sms;
        if (line != null) {
            wordCount = Integer.parseInt(line);
            for (int i = 0; i < wordCount; i++) {
                words.add(in.readLine());
            }
            sms = in.readLine();
            String correctSms = "<3";
            for (String word : words) {
                correctSms += word + "<3";
            }
            int i = 0;
            System.out.println(correctSms);
            for (int it = 0; it < sms.length(); it++) {
                if (i < correctSms.length()) {
                    if (correctSms.charAt(i) == sms.charAt(it)) {
                        i++;
                    }
                } else {
                    out.print("no");
                    return;
                }
            }
            if (i < correctSms.length()) {
                out.print("no");
            } else {
                out.print("yes");
            }
        } else {
            out.print("no");
        }
    }
}


import java.io.*;
import java.util.ArrayList;
import java.util.Locale;

public class Solution implements Runnable {

    static BufferedReader in;
    static PrintWriter out;

    public static void main(String[] args) {
        new Thread(null, new Solution(), "", 256 * (1L << 20)).start();
    }

    public void run() {
        try {
            long t1 = System.currentTimeMillis();
            if (System.getProperty("ONLINE_JUDGE") != null) {
                out = new PrintWriter(System.out);
                in = new BufferedReader(new InputStreamReader(System.in));
            } else {
                out = new PrintWriter("output.txt");
                in = new BufferedReader(new FileReader("input.txt"));
            }
            Locale.setDefault(Locale.US);
            solve();
            long t2 = System.currentTimeMillis();
            System.err.println("Time = " + (t2 - t1));
        } catch (Throwable t) {
            t.printStackTrace(System.err);
            System.exit(-1);
        } finally {
            try {
                in.close();
                out.close();
            } catch (IOException e) {
                e.printStackTrace();
                System.exit(-1);
            }
        }
    }

    // solution
    void solve() throws IOException {
        String line = in.readLine();
        int wordCount;
        ArrayList<String> words = new ArrayList<String>();
        ArrayList<String> delimiters = new ArrayList<String>();
        String sms;
        if (line != null) {
            wordCount = Integer.parseInt(line);
            for (int i = 0; i < wordCount; i++) {
                words.add(in.readLine());
            }
            sms = in.readLine();
            String correctSms = "<3";
            for (String word : words) {
                correctSms += word + "<3";
            }
            int i = 0;
            for (int it = 0; it < sms.length(); it++) {
                if (sms.charAt(it) < correctSms.length()) {
                    if (correctSms.charAt(i) == sms.charAt(it)) {
                        i++;
                    }
                } else {
                    out.print("no");
                    return;
                }
            }
            if (i < correctSms.length()) {
                out.print("no");
            } else {
                out.print("yes");
            }
        } else {
            out.print("no");
        }
    }
}


import java.io.*;
import java.util.ArrayList;
import java.util.Locale;
import java.util.StringTokenizer;

public class Solution implements Runnable {

    static BufferedReader in;
    static PrintWriter out;

    public static void main(String[] args) {
        new Thread(null, new Solution(), "", 256 * (1L << 20)).start();
    }

    public void run() {
        try {
            long t1 = System.currentTimeMillis();
            if (System.getProperty("ONLINE_JUDGE") != null) {
                out = new PrintWriter(System.out);
                in = new BufferedReader(new InputStreamReader(System.in));
            } else {
                out = new PrintWriter("output.txt");
                in = new BufferedReader(new FileReader("input.txt"));
            }
            Locale.setDefault(Locale.US);
            solve();
            long t2 = System.currentTimeMillis();
            System.err.println("Time = " + (t2 - t1));
        } catch (Throwable t) {
            t.printStackTrace(System.err);
            System.exit(-1);
        } finally {
            try {
                in.close();
                out.close();
            } catch (IOException e) {
                e.printStackTrace();
                System.exit(-1);
            }
        }
    }

    // solution
    void solve() throws IOException {
        String line = in.readLine();
        int wordCount;
        ArrayList<String> words = new ArrayList<String>();
        ArrayList<String> delimiters = new ArrayList<String>();
        String sms;
        if (line != null) {
            wordCount = Integer.parseInt(line);
            for (int i = 0; i < wordCount; i++) {
                words.add(in.readLine());
            }
            sms = in.readLine();
            String correctSms = "<3";
            for (String word : words) {
                correctSms += word + "<3";
            }
            int i = 0;
            for (int it = 0; it < sms.length(); it++) {
                if (correctSms.charAt(i) == sms.charAt(it)) {
                    i++;
                }
            }
            if (i < correctSms.length()) {
                out.print("no");
            } else {
                out.print("yes");
            }
        } else {
            out.print("no");
        }
    }
}


import java.io.*;
import java.util.ArrayList;
import java.util.Locale;

public class Solution implements Runnable {

    static BufferedReader in;
    static PrintWriter out;

    public static void main(String[] args) {
        new Thread(null, new Solution(), "", 256 * (1L << 20)).start();
    }

    public void run() {
        try {
            long t1 = System.currentTimeMillis();
            if (System.getProperty("ONLINE_JUDGE") != null) {
                out = new PrintWriter(System.out);
                in = new BufferedReader(new InputStreamReader(System.in));
            } else {
                out = new PrintWriter("output.txt");
                in = new BufferedReader(new FileReader("input.txt"));
            }
            Locale.setDefault(Locale.US);
            solve();
            long t2 = System.currentTimeMillis();
            System.err.println("Time = " + (t2 - t1));
        } catch (Throwable t) {
            t.printStackTrace(System.err);
            System.exit(-1);
        } finally {
            try {
                in.close();
                out.close();
            } catch (IOException e) {
                e.printStackTrace();
                System.exit(-1);
            }
        }
    }

    // solution
    void solve() throws IOException {
        String line = in.readLine();
        int wordCount;
        ArrayList<String> words = new ArrayList<String>();
        ArrayList<String> delimiters = new ArrayList<String>();
        String sms;
        if (line != null) {
            wordCount = Integer.parseInt(line);
            for (int i = 0; i < wordCount; i++) {
                words.add(in.readLine());
            }
            sms = in.readLine();
            String correctSms = "<3";
            for (String word : words) {
                correctSms += word + "<3";
            }
            int i = 0;
            for (int it = 0; it < sms.length(); it++) {
                if (i < correctSms.length()) {
                    if (correctSms.charAt(i) == sms.charAt(it)) {
                        i++;
                    }
                } else {
                    out.print("yes");
                    return;
                }
            }
            if (i < correctSms.length()) {
                out.print("no");
            } else {
                out.print("yes");
            }
        } else {
            out.print("no");
        }
    }
}


import java.io.*;
import java.util.ArrayList;
import java.util.Locale;

public class Solution implements Runnable {

    static BufferedReader in;
    static PrintWriter out;

    public static void main(String[] args) {
        new Thread(null, new Solution(), "", 256 * (1L << 20)).start();
    }

    public void run() {
        try {
            long t1 = System.currentTimeMillis();
            if (System.getProperty("ONLINE_JUDGE") != null) {
                out = new PrintWriter(System.out);
                in = new BufferedReader(new InputStreamReader(System.in));
            } else {
                out = new PrintWriter("output.txt");
                in = new BufferedReader(new FileReader("input.txt"));
            }
            Locale.setDefault(Locale.US);
            solve();
            long t2 = System.currentTimeMillis();
            System.err.println("Time = " + (t2 - t1));
        } catch (Throwable t) {
            t.printStackTrace(System.err);
            System.exit(-1);
        } finally {
            try {
                in.close();
                out.close();
            } catch (IOException e) {
                e.printStackTrace();
                System.exit(-1);
            }
        }
    }

    // solution
    void solve() throws IOException {
        String line = in.readLine();
        int wordCount;
        ArrayList<String> words = new ArrayList<String>();
        String sms;
        if (line != null) {
            wordCount = Integer.parseInt(line);
            for (int i = 0; i < wordCount; i++) {
                words.add(in.readLine());
            }
            sms = in.readLine();
            StringBuilder stringBuilder = new StringBuilder("<3");
            for (String word : words) {
                stringBuilder.append(word).append("<3");
            }
            String correctSms = stringBuilder.toString();
            int i = 0;
            for (int it = 0; it < sms.length(); it++) {
                if (i < correctSms.length()) {
                    if (correctSms.charAt(i) == sms.charAt(it)) {
                        i++;
                    }
                } else {
                    out.print("yes");
                    return;
                }
            }
            if (i < correctSms.length()) {
                out.print("no");
            } else {
                out.print("yes");
            }
        } else {
            out.print("no");
        }
    }
}


import java.io.*;
import java.util.ArrayList;
import java.util.Locale;

public class Solution implements Runnable {

    static BufferedReader in;
    static PrintWriter out;

    public static void main(String[] args) {
        new Thread(null, new Solution(), "", 256 * (1L << 20)).start();
    }

    public void run() {
        try {
            long t1 = System.currentTimeMillis();
            if (System.getProperty("ONLINE_JUDGE") != null) {
                out = new PrintWriter(System.out);
                in = new BufferedReader(new InputStreamReader(System.in));
            } else {
                out = new PrintWriter("output.txt");
                in = new BufferedReader(new FileReader("input.txt"));
            }
            Locale.setDefault(Locale.US);
            solve();
            long t2 = System.currentTimeMillis();
            System.err.println("Time = " + (t2 - t1));
        } catch (Throwable t) {
            t.printStackTrace(System.err);
            System.exit(-1);
        } finally {
            try {
                in.close();
                out.close();
            } catch (IOException e) {
                e.printStackTrace();
                System.exit(-1);
            }
        }
    }

    // solution
    void solve() throws IOException {
        String line = in.readLine();
        int wordCount;
        ArrayList<String> words = new ArrayList<String>();
        ArrayList<String> delimiters = new ArrayList<String>();
        String sms;
        if (line != null) {
            wordCount = Integer.parseInt(line);
            for (int i = 0; i < wordCount; i++) {
                words.add(in.readLine());
            }
            sms = in.readLine();
            String correctSms = "<3";
            for (String word : words) {
                correctSms += word + "<3";
            }
            int i = 0;
            for (int it = 0; it < sms.length(); it++) {
                if (i < correctSms.length()) {
                    if (correctSms.charAt(i) == sms.charAt(it)) {
                        i++;
                    }
                } else {
                    out.print("no");
                    return;
                }
            }
            if (i < correctSms.length()) {
                out.print("no");
            } else {
                out.print("yes");
            }
        } else {
            out.print("no");
        }
    }
}


import java.io.*;

public class N358B {
    public static void main(String[] args) throws Exception{
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        int n = Integer.parseInt(br.readLine());
        StringBuilder sb = new StringBuilder();
        for(int i = 0; i < n; i++){
            sb.append("<3").append(br.readLine());
        }
        sb.append("<3");
        String str = sb.toString();
        String message = br.readLine();
        int index = 0;
        for(int i = 0; i < message.length() && index < str.length(); i++){
            if(str.charAt(index) == message.charAt(i)) index++;
        }
        if(index == message.length()) System.out.println("yes");
        else System.out.println("no");
    }
}


import java.io.*;

public class N358B {
    public static void main(String[] args) throws Exception{
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        int n = Integer.parseInt(br.readLine());
        StringBuilder sb = new StringBuilder();
        for(int i = 0; i < n; i++){
            sb.append("<3").append(br.readLine());
        }
        sb.append("<3");
        String str = sb.toString();
        String message = br.readLine();
        int index = 0;
        for(int i = 0; i < message.length() && index < str.length(); i++){
            if(str.charAt(index) == message.charAt(i)) index++;
        }
        if(index == str.length()) System.out.println("yes");
        else System.out.println("no");
    }
}


import java.util.*;
import java.io.*;

public class TaskB {
    FastScanner in;
    PrintWriter out;

    public void solve() throws IOException {
        int n = in.nextInt();
        String[] words = new String[n];
        for (int i = 0; i < n; i++) {
            words[i] = in.next();
        }
        String sms = in.next();
        int i = 0;
        int j = 0;

        boolean ans = true;
        while (i < sms.length() && j < n) {
            boolean br = false;
            boolean th = false;
            while (i < sms.length() && (sms.charAt(i) != words[j].charAt(0) || !th)) {
                if (sms.charAt(i) == '<') {
                    br = true;
                }
                if (br && sms.charAt(i) == '3') {
                    th = true;
                }
                i++;
            }
            if (i == sms.length()) {
                    ans = false;
                break;
            }
            int l = 0;
            while (l < words[j].length()) {
                if (i == sms.length()) {
                    ans = false;
                    break;
                }
                if (sms.charAt(i) == words[j].charAt(l)) {
                    l++;
                }
                i++;
            }
            j++;
        }
        boolean br = false;
        boolean th = false;
        while (i < sms.length()) {
            if (sms.charAt(i) == '<') {
                br = true;
            }
            if (br && sms.charAt(i) == '3') {
                th = true;
            }
            i++;
        }
        if (!th) {
            ans = false;
        }
        if (ans) {
            out.print("yes");
        } else {
            out.print("no");
        }
    }

    public void run() {
        try {
            in = new FastScanner();
            out = new PrintWriter(new OutputStreamWriter(System.out));

            solve();

            out.close();
        } catch (IOException e) {
            e.printStackTrace();
        }
    }

    class FastScanner {
        BufferedReader br;
        StringTokenizer st;

        FastScanner() {
            br = new BufferedReader(new InputStreamReader(System.in));
        }

        String next() {
            while (st == null || !st.hasMoreTokens()) {
                try {
                    st = new StringTokenizer(br.readLine());
                } catch (IOException e) {
                    e.printStackTrace();
                }
            }
            return st.nextToken();
        }

        int nextInt() {
            return Integer.parseInt(next());
        }

        double nextDouble() {
            return Double.parseDouble(next());
        }
    }

    public static void main(String[] arg) {
        new TaskB().run();
    }
}


import java.io.*;
import java.util.*;

public class CF {

	void solve() {
		int n = in.nextInt() + 1;
		String[] s = new String[n];
		s[0] = "<3";
		for (int i = 1; i < n; i++)
			s[i] = in.next() + "<3";
		String ss = in.next();
		int it = 0;
		for (int i1 = 0; i1 < n; i1++)
			for (int i2 = 0; i2 < s[i1].length(); i2++) {
				char c = s[i1].charAt(i2);
				while (it < ss.length() && ss.charAt(it) != c)
					it++;
				if (it == ss.length()) {
					out.println("no");
					return;
				}
it++;
			}
		out.println("yes");
	}

	FastScaner in;
	PrintWriter out;

	void run() {
		in = new FastScaner(System.in);
		out = new PrintWriter(System.out);

		solve();

		out.close();
	}

	void runWithFiles() {
		in = new FastScaner(new File("input.txt"));
		try {
			out = new PrintWriter(new File("output.txt"));
		} catch (FileNotFoundException e) {
			e.printStackTrace();
		}

		solve();

		out.close();
	}

	public static void main(String[] args) {
		Locale.setDefault(Locale.US);
		new CF().run();
	}

	class FastScaner {
		BufferedReader br;
		StringTokenizer st;

		FastScaner(InputStream is) {
			br = new BufferedReader(new InputStreamReader(is));
		}

		FastScaner(File f) {
			try {
				br = new BufferedReader(new FileReader(f));
			} catch (FileNotFoundException e) {
				e.printStackTrace();
			}
		}

		String next() {
			while (st == null || !st.hasMoreElements()) {
				String s = null;
				try {
					s = br.readLine();
				} catch (IOException e) {
					e.printStackTrace();
				}
				if (s == null)
					return null;
				st = new StringTokenizer(s);
			}
			return st.nextToken();
		}

		int nextInt() {
			return Integer.parseInt(next());
		}

		long nextLong() {
			return Long.parseLong(next());
		}

		double nextDouble() {
			return Double.parseDouble(next());
		}
	}
}


import java.io.*;
import java.util.*;

public class CF {

	void solve() {
		int n = in.nextInt() + 1;
		String[] s = new String[n];
		s[0] = "<3";
		for (int i = 1; i < n; i++)
			s[i] = in.next() + "<3";
		String ss = in.next();
		int it = 0;
		for (int i1 = 0; i1 < n; i1++)
			for (int i2 = 0; i2 < s[i1].length(); i2++) {
				char c = s[i1].charAt(i2);
				while (it < ss.length() && ss.charAt(it) != c)
					it++;
				if (it == ss.length()) {
					out.println("no");
					return;
				}
			}
		out.println("yes");
	}

	FastScaner in;
	PrintWriter out;

	void run() {
		in = new FastScaner(System.in);
		out = new PrintWriter(System.out);

		solve();

		out.close();
	}

	void runWithFiles() {
		in = new FastScaner(new File("input.txt"));
		try {
			out = new PrintWriter(new File("output.txt"));
		} catch (FileNotFoundException e) {
			e.printStackTrace();
		}

		solve();

		out.close();
	}

	public static void main(String[] args) {
		Locale.setDefault(Locale.US);
		new CF().run();
	}

	class FastScaner {
		BufferedReader br;
		StringTokenizer st;

		FastScaner(InputStream is) {
			br = new BufferedReader(new InputStreamReader(is));
		}

		FastScaner(File f) {
			try {
				br = new BufferedReader(new FileReader(f));
			} catch (FileNotFoundException e) {
				e.printStackTrace();
			}
		}

		String next() {
			while (st == null || !st.hasMoreElements()) {
				String s = null;
				try {
					s = br.readLine();
				} catch (IOException e) {
					e.printStackTrace();
				}
				if (s == null)
					return null;
				st = new StringTokenizer(s);
			}
			return st.nextToken();
		}

		int nextInt() {
			return Integer.parseInt(next());
		}

		long nextLong() {
			return Long.parseLong(next());
		}

		double nextDouble() {
			return Double.parseDouble(next());
		}
	}
}


import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.PrintWriter;
import java.math.BigInteger;
import java.util.*;

public class B implements Runnable {

    private void solve() throws IOException {
        int n = nextInt();
        StringBuilder all = new StringBuilder();
        all.append("");
        for (int i = 0; i < n; i++) {
            all.append(nextToken() + "");
        }
        StringBuilder sentence = new StringBuilder(nextToken());
        int cur = 0;
        for (int i = 0; i < sentence.length(); i++) {
            if (sentence.charAt(i) == all.charAt(cur)) {
                cur++;
            }
        }
        if (cur == all.length()) {
            pl("yes");
        } else {
            pl("no");
        }
    }

    public static void main(String[] args) {
        new B().run();
    }

    BufferedReader reader;
    StringTokenizer tokenizer;
    PrintWriter writer;

    public void run() {
        try {
            reader = new BufferedReader(new BufferedReader(new InputStreamReader(System.in)));
            writer = new PrintWriter(System.out);
            tokenizer = null;
            solve();
            reader.close();
            writer.close();
        } catch (Exception e) {
            e.printStackTrace();
            System.exit(1);
        }
    }

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

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

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

    BigInteger nextBigInteger() throws IOException {
        return new BigInteger(nextToken());
    }

    String nextToken() throws IOException {
        while (tokenizer == null || !tokenizer.hasMoreTokens()) {
            tokenizer = new StringTokenizer(reader.readLine());
        }
        return tokenizer.nextToken();
    }

    void p(Object... objects) {
        for (int i = 0; i < objects.length; i++) {
            if (i != 0)
                writer.print(' ');
            writer.print(objects[i]);
        }
    }

    void pl(Object... objects) {
        p(objects);
        writer.println();
    }

    int cc;

    void pf() {
        writer.printf("Case #%d: ", ++cc);
    }

}


import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.PrintWriter;
import java.math.BigInteger;
import java.util.*;

public class B implements Runnable {

    private void solve() throws IOException {
        int n = nextInt();
        StringBuilder all = new StringBuilder();
        all.append("<3");
        for (int i = 0; i < n; i++) {
                all.append(nextToken() + "<3");
        }
        StringBuilder sentence = new StringBuilder(nextToken());
        int cur = 0;
        for (int i = 0; i < sentence.length(); i++) {
                if (cur < all.length() && sentence.charAt(i) == all.charAt(cur)) {
                        cur++;
                }
        }
        if (cur == all.length()) {
                pl("yes");
        } else {
                pl("no");
        }
    }

    public static void main(String[] args) {
        new B().run();
    }

    BufferedReader reader;
    StringTokenizer tokenizer;
    PrintWriter writer;

    public void run() {
        try {
            reader = new BufferedReader(new BufferedReader(new InputStreamReader(System.in)));
            writer = new PrintWriter(System.out);
            tokenizer = null;
            solve();
            reader.close();
            writer.close();
        } catch (Exception e) {
            e.printStackTrace();
            System.exit(1);
        }
    }

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

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

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

    BigInteger nextBigInteger() throws IOException {
        return new BigInteger(nextToken());
    }

    String nextToken() throws IOException {
        while (tokenizer == null || !tokenizer.hasMoreTokens()) {
            tokenizer = new StringTokenizer(reader.readLine());
        }
        return tokenizer.nextToken();
    }

    void p(Object... objects) {
        for (int i = 0; i < objects.length; i++) {
            if (i != 0)
                writer.print(' ');
            writer.print(objects[i]);
        }
    }

    void pl(Object... objects) {
        p(objects);
        writer.println();
    }

    int cc;

    void pf() {
        writer.printf("Case #%d: ", ++cc);
    }

}


import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.PrintWriter;
import java.math.BigInteger;
import java.util.*;

public class B implements Runnable {

    private void solve() throws IOException {
        int n = nextInt();
        String[] f = new String[n];
        StringBuilder reg = new StringBuilder();
        for (int i = 0; i < n; i++) {
            f[i] = nextToken();
            reg.append(".+" + f[i]);
        }
        reg.append(".+");
        String s = nextToken();
        pl(s.matches(reg.toString()) ? "yes" : "no");
    }

    public static void main(String[] args) {
        new B().run();
    }

    BufferedReader reader;
    StringTokenizer tokenizer;
    PrintWriter writer;

    public void run() {
        try {
            reader = new BufferedReader(new BufferedReader(new InputStreamReader(System.in)));
            writer = new PrintWriter(System.out);
            tokenizer = null;
            solve();
            reader.close();
            writer.close();
        } catch (Exception e) {
            e.printStackTrace();
            System.exit(1);
        }
    }

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

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

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

    BigInteger nextBigInteger() throws IOException {
        return new BigInteger(nextToken());
    }

    String nextToken() throws IOException {
        while (tokenizer == null || !tokenizer.hasMoreTokens()) {
            tokenizer = new StringTokenizer(reader.readLine());
        }
        return tokenizer.nextToken();
    }

    void p(Object... objects) {
        for (int i = 0; i < objects.length; i++) {
            if (i != 0)
                writer.print(' ');
            writer.print(objects[i]);
        }
    }

    void pl(Object... objects) {
        p(objects);
        writer.println();
    }

    int cc;

    void pf() {
        writer.printf("Case #%d: ", ++cc);
    }

}


import java.io.OutputStream;
import java.io.IOException;
import java.io.PrintWriter;
import java.util.InputMismatchException;
import java.math.BigInteger;
import java.io.InputStream;

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

class TaskB
{
    int n;
    String s[];
    String encode;
    public void solve(int testNumber, FastReader in, PrintWriter out)
    {
        n = in.ni ();
        s = new String[n];
        for (int i = 0; i < n; i++)
        {
            s[i] = in.ns ();
        }
        encode = in.ns ();
        int wCtr = 0;
        int curIndex =0 ;

        while (wCtr != n)
        {
            curIndex = encode.indexOf ("<", curIndex);
            if (curIndex == -1)
            {
                break;
            }
            curIndex++;
            curIndex = encode.indexOf ("3", curIndex);
            if (curIndex == -1)
            {
                break;
            }
            curIndex++;
            curIndex = getIndex (encode, curIndex, s[wCtr++]);
            if (curIndex == -1)
            {
                break;
            }
        }
        //find last heart
        if (curIndex == -1)
        {
            out.println ("no");
            return;
        }
        curIndex = encode.indexOf ("<", curIndex);
        if (curIndex == -1)
        {
            out.println ("no");
            return;
        }
        curIndex++;
        curIndex = encode.indexOf ("3", curIndex);
        if (curIndex == -1)
        {
            out.println ("no");
            return;
        }
        curIndex++;
        out.println ("yes");

    }

    private int getIndex(String encode, int curIndex, String s)
    {
        for (char c : s.toCharArray ())
        {
            curIndex = encode.indexOf (c, curIndex);

            if (curIndex == -1)
            {
                return -1;
            }
            curIndex++;
        }
        return curIndex;
    }
}

class FastReader
{

    public InputStream stream;
    private byte[] buf = new byte[1024];
    private int curChar;
    private int numChars;
    private SpaceCharFilter filter;

    public FastReader(InputStream stream)
    {
        this.stream = stream;
    }

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

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

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

    public boolean isSpaceChar(int c)
    {
        if (filter != null)
        {
            return filter.isSpaceChar (c);
        }
        return isWhitespace (c);
    }

    public static boolean isWhitespace(int c)
    {
        return c == ' ' || c == '\n' || c == '\r' || c == '\t' || c == -1;
    }

    public interface SpaceCharFilter
    {
        public boolean isSpaceChar(int ch);
    }
}


import java.io.OutputStream;
import java.io.IOException;
import java.io.PrintWriter;
import java.util.InputMismatchException;
import java.math.BigInteger;
import java.io.InputStream;

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

class TaskB
{
    int n;
    String s[];
    String encode;
    public void solve(int testNumber, FastReader in, PrintWriter out)
    {
        n = in.ni ();
        s = new String[n];
        for (int i = 0; i < n; i++)
        {
            s[i] = in.ns ();
        }
        encode = in.ns ();
        int wCtr = 0;
        int curIndex =0 ;

        while (wCtr != n)
        {
            curIndex = encode.indexOf ("<", curIndex);
            if (curIndex == -1)
            {
                break;
            }
            curIndex++;
            curIndex = encode.indexOf ("3", curIndex);
            if (curIndex == -1)
            {
                break;
            }
            curIndex++;
            curIndex = encode.indexOf (s[wCtr], curIndex);
            if (curIndex == -1)
            {
                break;
            }
            curIndex += s[wCtr++].length ();
        }
        //find last heart
        if (curIndex == -1)
        {
            out.println ("no");
            return;
        }
        curIndex = encode.indexOf ("<", curIndex);
        if (curIndex == -1)
        {
            out.println ("no");
            return;
        }
        curIndex++;
        curIndex = encode.indexOf ("3", curIndex);
        if (curIndex == -1)
        {
            out.println ("no");
            return;
        }
        curIndex++;
        out.println ("yes");

    }
}

class FastReader
{

    public InputStream stream;
    private byte[] buf = new byte[1024];
    private int curChar;
    private int numChars;
    private SpaceCharFilter filter;

    public FastReader(InputStream stream)
    {
        this.stream = stream;
    }

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

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

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

    public boolean isSpaceChar(int c)
    {
        if (filter != null)
        {
            return filter.isSpaceChar (c);
        }
        return isWhitespace (c);
    }

    public static boolean isWhitespace(int c)
    {
        return c == ' ' || c == '\n' || c == '\r' || c == '\t' || c == -1;
    }

    public interface SpaceCharFilter
    {
        public boolean isSpaceChar(int ch);
    }
}


import java.io.IOException;
import java.io.PrintWriter;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.InputMismatchException;
import java.util.Stack;

public class Q1 {
	public static void main(String[] args) {
        FasterScanner s= new FasterScanner();
        PrintWriter out=new PrintWriter(System.out);
        int n=s.nextInt();

        StringBuilder sb=new StringBuilder();
        for(int i=0;i<n;i++)
        {
        	sb.append("<3");
        	sb.append(s.nextLine());
        }
        char[] b=s.nextLine().toCharArray();
        sb.append("<3");
//        System.out.println(sb);
        char[] a=sb.toString().toCharArray();
        int j=0;
        for(int i=0;i<b.length;i++)
        {
        	if(j<a.length && a[j]==b[i])
        	{
        		j++;
        	}
        	else
        	{
        		if((b[i]>='a' && b[i]<='z') || (b[i]>='0' && b[i] <='9') || b[i]=='>' || b[i]=='<')
        		 continue;
        		else
        		{
        			System.out.println("no");
        			return;
        		}
        	}
        }
        if(j==a.length)
        {
        	System.out.println("yes");
        }
        else
        	System.out.println("no");
        out.close();
    }

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

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

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

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

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

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

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

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

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

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


import java.io.*;
import java.util.*;

public class cf358b {
  static FastIO in = new FastIO(), out = in;

  public static void main(String[] args) {
    int n = in.nextInt();
    StringBuilder sb = new StringBuilder("<3");
    for(int i=0; i<n; i++) {
      sb.append(in.next().trim());
      sb.append("<3");
    }
    String a = sb.toString();
    String b = in.next().trim();
    int apos = 0, bpos = 0;
    while(apos < a.length() && bpos < b.length()) {
      if(a.charAt(apos) == b.charAt(bpos)) apos++;
      bpos++;
    }
    out.println(apos==a.length()?"yes":"no");
    out.close();
  }

  static class FastIO extends PrintWriter {
    BufferedReader br;
    StringTokenizer st;

    public FastIO() {
      this(System.in, System.out);
    }

    public FastIO(InputStream in, OutputStream out) {
      super(new BufferedWriter(new OutputStreamWriter(out)));
      br = new BufferedReader(new InputStreamReader(in));
      scanLine();
    }

    public void scanLine() {
      try {
        st = new StringTokenizer(br.readLine().trim());
      } catch (Exception e) {
        throw new RuntimeException(e.getMessage());
      }
    }

    public int numTokens() {
      if (!st.hasMoreTokens()) {
        scanLine();
        return numTokens();
      }
      return st.countTokens();
    }

    public String next() {
      if (!st.hasMoreTokens()) {
        scanLine();
        return next();
      }
      return st.nextToken();
    }

    public double nextDouble() {
      return Double.parseDouble(next());
    }

    public long nextLong() {
      return Long.parseLong(next());
    }

    public int nextInt() {
      return Integer.parseInt(next());
    }
  }
}


import java.io.IOException;
import java.io.InputStreamReader;
import java.util.InputMismatchException;
import java.io.PrintStream;
import java.io.BufferedReader;
import java.io.OutputStream;
import java.io.PrintWriter;
import java.io.Reader;
import java.io.Writer;
import java.io.InputStream;

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

class TaskB {
    /////////////////////////////////////////////////////////////

    public void solve(int testNumber, FastScanner in, FastPrinter out) {
    int N=in.nextInt();
        StringBuilder sb= new StringBuilder();
        for (int i = 0; i < N; i++) {
            sb.append(in.next());
        }
        String S=in.next();
        int i=0,j=0;

        while(i<S.length()&&j<sb.length()){
            if(S.charAt(i)==sb.charAt(j)){
                i++;j++;
            }
            else i++;

        }
        if(j==sb.length()) out.println("yes");
        else out.println("no");

    }
}

class FastScanner extends BufferedReader {

    public FastScanner(InputStream is) {
        super(new InputStreamReader(is));
    }

    public int read() {
        try {
            int ret = super.read();
//            if (isEOF && ret < 0) {
//                throw new InputMismatchException();
//            }
//            isEOF = ret == -1;
            return ret;
        } catch (IOException e) {
            throw new InputMismatchException();
        }
    }

    public String next() {
        StringBuilder sb = new StringBuilder();
        int c = read();
        while (isWhiteSpace(c)) {
            c = read();
        }
        if (c < 0) {
            return null;
        }
        while (c >= 0 && !isWhiteSpace(c)) {
            sb.appendCodePoint(c);
            c = read();
        }
        return sb.toString();
    }

    static boolean isWhiteSpace(int c) {
        return c >= 0 && c <= 32;
    }

    public int nextInt() {
        int c = read();
        while (isWhiteSpace(c)) {
            c = read();
        }
        int sgn = 1;
        if (c == '-') {
            sgn = -1;
            c = read();
        }
        int ret = 0;
        while (c >= 0 && !isWhiteSpace(c)) {
            if (c < '0' || c > '9') {
                throw new NumberFormatException("digit expected " + (char) c
                        + " found");
            }
            ret = ret * 10 + c - '0';
            c = read();
        }
        return ret * sgn;
    }

    public String readLine() {
        try {
            return super.readLine();
        } catch (IOException e) {
            return null;
        }
    }

    }

class FastPrinter extends PrintWriter {

    public FastPrinter(OutputStream out) {
        super(out);
    }

    public FastPrinter(Writer out) {
        super(out);
    }

}


import java.io.IOException;
import java.io.InputStreamReader;
import java.util.InputMismatchException;
import java.io.PrintStream;
import java.io.BufferedReader;
import java.io.OutputStream;
import java.io.PrintWriter;
import java.util.TreeSet;
import java.io.Reader;
import java.io.Writer;
import java.io.InputStream;

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

class TaskB {
    /////////////////////////////////////////////////////////////

    public void solve(int testNumber, FastScanner in, FastPrinter out) {
    int N=in.nextInt();
        TreeSet<Integer> ts= new TreeSet<Integer>();
        StringBuilder sb= new StringBuilder();
       ts.add(0);
        for (int i = 0; i < N; i++) {
          String ss=in.next();
            sb.append(ss);
            ts.add(ts.last()+ss.length());

        }
        String S=in.next();
        int i=0,j=0;
        int gg=0;
        while(gg<2&&i<S.length()){
            if(gg==0&&S.charAt(i)=='<'){
                gg++;i++;
            }
            if(gg==1&&S.charAt(i)=='3'){
                gg=2;i++;
                break;
            }
            i++;

        }
        if(gg!=2){
            out.println("no");
            return;
        }
        else gg=0;

        while(i<S.length()&&j<sb.length()){
            if(S.charAt(i)==sb.charAt(j)){
                i++;j++;
                if(ts.contains(j)){
                    while(gg<2&&i<S.length()){
                        if(gg==0&&S.charAt(i)=='<'){
                            gg++;i++;
                        }
                        if(gg==1&&S.charAt(i)=='3'){
                            gg=2;i++;
                            break;
                        }
                        i++;

                    }
                    if(gg!=2){
                        out.println("no");
                        return;
                    }
                    else gg=0;

                }

            }
            else i++;

        }
        if(j==sb.length()) out.println("yes");
        else out.println("no");

    }
}

class FastScanner extends BufferedReader {

    public FastScanner(InputStream is) {
        super(new InputStreamReader(is));
    }

    public int read() {
        try {
            int ret = super.read();
//            if (isEOF && ret < 0) {
//                throw new InputMismatchException();
//            }
//            isEOF = ret == -1;
            return ret;
        } catch (IOException e) {
            throw new InputMismatchException();
        }
    }

    public String next() {
        StringBuilder sb = new StringBuilder();
        int c = read();
        while (isWhiteSpace(c)) {
            c = read();
        }
        if (c < 0) {
            return null;
        }
        while (c >= 0 && !isWhiteSpace(c)) {
            sb.appendCodePoint(c);
            c = read();
        }
        return sb.toString();
    }

    static boolean isWhiteSpace(int c) {
        return c >= 0 && c <= 32;
    }

    public int nextInt() {
        int c = read();
        while (isWhiteSpace(c)) {
            c = read();
        }
        int sgn = 1;
        if (c == '-') {
            sgn = -1;
            c = read();
        }
        int ret = 0;
        while (c >= 0 && !isWhiteSpace(c)) {
            if (c < '0' || c > '9') {
                throw new NumberFormatException("digit expected " + (char) c
                        + " found");
            }
            ret = ret * 10 + c - '0';
            c = read();
        }
        return ret * sgn;
    }

    public String readLine() {
        try {
            return super.readLine();
        } catch (IOException e) {
            return null;
        }
    }

    }

class FastPrinter extends PrintWriter {

    public FastPrinter(OutputStream out) {
        super(out);
    }

    public FastPrinter(Writer out) {
        super(out);
    }

}


import java.io.IOException;
import java.io.InputStreamReader;
import java.util.InputMismatchException;
import java.io.PrintStream;
import java.io.BufferedReader;
import java.io.OutputStream;
import java.io.PrintWriter;
import java.util.TreeSet;
import java.io.Reader;
import java.io.Writer;
import java.io.InputStream;

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

class TaskB {
    /////////////////////////////////////////////////////////////

    public void solve(int testNumber, FastScanner in, FastPrinter out) {
    int N=in.nextInt();
        TreeSet<Integer> ts= new TreeSet<Integer>();
        StringBuilder sb= new StringBuilder();
       ts.add(0);
        for (int i = 0; i < N; i++) {
          String ss=in.next();
            sb.append(ss);
            ts.add(ts.last()+ss.length());

        }
        String S=in.next();
        int i=0,j=0;
        int gg=0;
        while(gg<2&&i<S.length()){
            if(gg==0&&S.charAt(i)=='<'){
                gg++;i++;
            }
            else if(gg==1&&S.charAt(i)=='3'){
                gg=2;i++;
                break;
            }
            else
            i++;

        }
        if(gg!=2){
            out.println("no");
            return;
        }
        else gg=0;

        while(i<S.length()&&j<sb.length()){
            if(S.charAt(i)==sb.charAt(j)){
                i++;j++;
                if(ts.contains(j)){
                    while(gg<2&&i<S.length()){
                        if(gg==0&&S.charAt(i)=='<'){
                            gg++;i++;
                        }
                        else if(gg==1&&S.charAt(i)=='3'){
                            gg=2;i++;
                            break;
                        }
                        else i++;

                    }
                    if(gg!=2){
                        out.println("no");
                        return;
                    }
                    else gg=0;

                }

            }
            else i++;

        }
        if(j==sb.length()) out.println("yes");
        else out.println("no");

    }
}

class FastScanner extends BufferedReader {

    public FastScanner(InputStream is) {
        super(new InputStreamReader(is));
    }

    public int read() {
        try {
            int ret = super.read();
//            if (isEOF && ret < 0) {
//                throw new InputMismatchException();
//            }
//            isEOF = ret == -1;
            return ret;
        } catch (IOException e) {
            throw new InputMismatchException();
        }
    }

    public String next() {
        StringBuilder sb = new StringBuilder();
        int c = read();
        while (isWhiteSpace(c)) {
            c = read();
        }
        if (c < 0) {
            return null;
        }
        while (c >= 0 && !isWhiteSpace(c)) {
            sb.appendCodePoint(c);
            c = read();
        }
        return sb.toString();
    }

    static boolean isWhiteSpace(int c) {
        return c >= 0 && c <= 32;
    }

    public int nextInt() {
        int c = read();
        while (isWhiteSpace(c)) {
            c = read();
        }
        int sgn = 1;
        if (c == '-') {
            sgn = -1;
            c = read();
        }
        int ret = 0;
        while (c >= 0 && !isWhiteSpace(c)) {
            if (c < '0' || c > '9') {
                throw new NumberFormatException("digit expected " + (char) c
                        + " found");
            }
            ret = ret * 10 + c - '0';
            c = read();
        }
        return ret * sgn;
    }

    public String readLine() {
        try {
            return super.readLine();
        } catch (IOException e) {
            return null;
        }
    }

    }

class FastPrinter extends PrintWriter {

    public FastPrinter(OutputStream out) {
        super(out);
    }

    public FastPrinter(Writer out) {
        super(out);
    }

}


import java.util.*;

public class Main {

	Scanner sc;

	int n;
	HashSet<String> set;
	ArrayList<String> wlist;
	String str;

	void io() {
		sc = new Scanner(System.in);
		set = new HashSet<String>();
		wlist = new ArrayList<String>();

		n = sc.nextInt();
		for( int i = 0; i < n; ++i ) {
			String w = sc.next();
			set.add(w);
			wlist.add(w);
		}
		str = sc.next();

		boolean ans = solve();
		System.out.println(ans ? "yes" : "no");

		sc.close();
	}

	boolean solve() {
		boolean ans = true;
		ArrayList<Character> list = new ArrayList<>();

		for( char c : str.toCharArray() ) {
			if( ('0' <= c && c <= '9') && c != '3' ) continue;
			if( ('a' <= c && c <= 'z') || c == '<' || c == '3' ) {
				list.add(c);
			} else {
//				ans = false;
			}
		}

		char[] semi_pure = new char[list.size()];
		for( int i = 0; i < list.size(); ++i ) {
			semi_pure[i] = list.get(i);
		}

		String ssp = new String(semi_pure);
		String[] ps = ssp.split("<3");

		for( int i = 0; i < ps.length; ++i ) {
			String w = "";
			for( char c : ps[i].toCharArray() ) {
				if( c == '3' ) continue;
				if( 'a' <= c && c <= 'z' ) {
					w += c + "";
				}else{
//					ans = false;
				}
			}
			ps[i] = w;
		}

//		debug( ps, ans );

		ArrayList<String> outcome = new ArrayList<>();
		for( String w : ps ) {
			if( w.equals("") ) continue;
			outcome.add(w);
			ans &= set.contains(w);
		}

		ans &= wlist.size() == outcome.size();
		if( ans ) {
			for( int i = 0; i < wlist.size(); ++i ) {
				ans &= wlist.get(i).equals(outcome.get(i));
			}
		}

		return ans;
	}

	public static void main(String[] args) {
		new Main().io();
	}

	void debug(Object... os) {
		System.err.println(Arrays.deepToString(os));
	}
}


import java.util.*;

public class Main {

	Scanner sc;

	int n;
	HashSet<String> set;
	ArrayList<String> wlist;
	String str;

	void io() {
		sc = new Scanner(System.in);
		set = new HashSet<String>();
		wlist = new ArrayList<String>();

		n = sc.nextInt();
		for( int i = 0; i < n; ++i ) {
			String w = sc.next();
			set.add(w);
			wlist.add(w);
		}
		str = sc.next();

		boolean ans = solve();
		System.out.println(ans ? "yes" : "no");

		sc.close();
	}

	boolean solve() {
		boolean ans = true;
		ArrayList<Character> list = new ArrayList<>();

		for( char c : str.toCharArray() ) {
			if( ('0' <= c && c <= '9') && c != '3' ) continue;
			if( ('a' <= c && c <= 'z') || c == '<' || c == '3' ) {
				list.add(c);
			} else {
//				ans = false;
			}
		}

		char[] semi_pure = new char[list.size()];
		for( int i = 0; i < list.size(); ++i ) {
			semi_pure[i] = list.get(i);
		}

		String ssp = new String(semi_pure);
		String[] ps = ssp.split("<3");

		for( int i = 0; i < ps.length; ++i ) {
			String w = "";
			for( char c : ps[i].toCharArray() ) {
				if( c == '3' ) continue;
				if( 'a' <= c && c <= 'z' ) {
					w += c + "";
				}else{
//					ans = false;
				}
			}
			ps[i] = w;
		}

		ArrayList<String> outcome = new ArrayList<>();
		for( String w : ps ) {
			outcome.add(w);
			ans &= set.contains(w);
		}
		assert( outcome.get(0).equals("") );
		outcome.remove(0);

		ans &= wlist.size() == outcome.size();
		if( ans ) {
			for( int i = 0; i < wlist.size(); ++i ) {
//				ans &= wlist.get(i).equals(outcome.get(i));
				ans &= isInIt(wlist.get(i), outcome.get(i));
			}
		}

		debug(outcome);

		return ans;
	}

	boolean isInIt(String A, String B) {
		char[] a = A.toCharArray();
		char[] b = B.toCharArray();

		int index = 0;
		int depth = 0;
		while( index < a.length && depth < b.length) {
			if( a[index] == b[depth] ) {
				++index;
				++depth;
				continue;
			}else{
				++depth;
			}
		}

		return index == a.length;
	}

	public static void main(String[] args) {
		new Main().io();
	}

	void debug(Object... os) {
		System.err.println(Arrays.deepToString(os));
	}
}


import java.util.*;

public class Main {

	Scanner sc;

	int n;
	HashSet<String> set;
	String str;

	void io() {
		sc = new Scanner(System.in);
		set = new HashSet<String>();

		n = sc.nextInt();
		for( int i = 0; i < n; ++i ) {
			String w = sc.next();
			set.add(w);
		}
		str = sc.next();

		boolean ans = solve();
		System.out.println(ans ? "yes" : "no");

		sc.close();
	}

	boolean solve() {
		boolean ans = true;
		ArrayList<Character> list = new ArrayList<>();

		for( char c : str.toCharArray() ) {
			if( ('0' <= c && c <= '9') && c != '3' ) continue;
			if( ('a' <= c && c <= 'z') || c == '<' || c == '3' ) {
				list.add(c);
			} else {
				ans = false;
			}
		}

		char[] semi_pure = new char[list.size()];
		for( int i = 0; i < list.size(); ++i ) {
			semi_pure[i] = list.get(i);
		}

		String ssp = new String(semi_pure);
		String[] ps = ssp.split("<3");

		for( int i = 0; i < ps.length; ++i ) {
			String w = "";
			for( char c : ps[i].toCharArray() ) {
				if( c == '3' ) continue;
				if( 'a' <= c && c <= 'z' ) {
					w += c + "";
				}else{
					ans = false;
				}
			}
			ps[i] = w;
		}

//		debug( ps, ans );

		for( String w : ps ) {
			if( w.equals("") ) continue;
			ans &= set.contains(w);
		}

		return ans;
	}

	public static void main(String[] args) {
		new Main().io();
	}

	void debug(Object... os) {
		System.err.println(Arrays.deepToString(os));
	}
}


import java.util.*;

public class Main {
	void solve() {
		Scanner sc = new Scanner(System.in);

		int n = sc.nextInt();
		StringBuffer sb = new StringBuffer();
		for( int i = 0; i < n; ++i ) {
			sb.append( sc.next() );
		}
		char[] msg    = sb.toString().toCharArray();
		char[] letter = sc.next().toCharArray();

		int index = 0;
		int p = 0;
		while( index < msg.length && p < letter.length ) {
			if( msg[index] == letter[p] ) {
				++index;
			}

			++p;
		}

		System.out.println( index == msg.length ? "yes" : "no" );

		sc.close();
	}

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

	void debug(Object... os) {
		System.err.println(Arrays.deepToString(os));
	}
}


import java.util.*;

public class Main {

	Scanner sc;

	int n;
	HashSet<String> set;
	ArrayList<String> wlist;
	String str;

	void io() {
		sc = new Scanner(System.in);
		set = new HashSet<String>();
		wlist = new ArrayList<String>();

		n = sc.nextInt();
		for( int i = 0; i < n; ++i ) {
			String w = sc.next();
			set.add(w);
			wlist.add(w);
		}
		str = sc.next();

		boolean ans = solve();
		System.out.println(ans ? "yes" : "no");

		sc.close();
	}

	boolean solve() {
		boolean ans = true;
		ArrayList<Character> list = new ArrayList<>();

		for( char c : str.toCharArray() ) {
			if( ('0' <= c && c <= '9') && c != '3' ) continue;
			if( ('a' <= c && c <= 'z') || c == '<' || c == '3' ) {
				list.add(c);
			} else {
//				ans = false;
			}
		}

		char[] semi_pure = new char[list.size()];
		for( int i = 0; i < list.size(); ++i ) {
			semi_pure[i] = list.get(i);
		}

		String ssp = new String(semi_pure);
		String[] ps = ssp.split("<3");

		for( int i = 0; i < ps.length; ++i ) {
			String w = "";
			for( char c : ps[i].toCharArray() ) {
				if( c == '3' ) continue;
				if( 'a' <= c && c <= 'z' ) {
					w += c + "";
				}else{
//					ans = false;
				}
			}
			ps[i] = w;
		}

//		debug( ps, ans );

		ArrayList<String> outcome = new ArrayList<>();
		for( String w : ps ) {
			if( w.equals("") ) continue;
			outcome.add(w);
			ans &= set.contains(w);
		}

		ans &= wlist.size() == outcome.size();
		if( ans ) {
			for( int i = 0; i < wlist.size(); ++i ) {
//				ans &= wlist.get(i).equals(outcome.get(i));
				ans &= isInIt(wlist.get(i), outcome.get(i));
			}
		}

		return ans;
	}

	boolean isInIt(String A, String B) {
		char[] a = A.toCharArray();
		char[] b = B.toCharArray();

		int index = 0;
		int depth = 0;
		while( index < a.length && depth < b.length) {
			if( a[index] == b[depth] ) {
				++index;
				++depth;
				continue;
			}else{
				++depth;
			}
		}

		return index == a.length;
	}

	public static void main(String[] args) {
		new Main().io();
	}

	void debug(Object... os) {
		System.err.println(Arrays.deepToString(os));
	}
}


import java.util.*;

public class Main {
	void solve() {
		Scanner sc = new Scanner(System.in);

		int n = sc.nextInt();
		String[] list = new String[n];
		for( int i = 0; i < n; ++i ) {
			list[i] = sc.next();
		}
		String letter = sc.next();

		String heart = "<3";

		int i = 0;
		int p = 0;
		while( p < letter.length() && i < list.length ) {
			int j;
			j = 0;
			while( j < heart.length() && p < letter.length() ) {
				if( heart.charAt(j) == letter.charAt(p) ) {
					++j;
				}
				++p;
			}

			j = 0;
			while( j < list[i].length() && p < letter.length() ) {
				if( list[i].charAt(j) == letter.charAt(p) ) {
					++j;
				}
				++p;
			}
			if( j == list[i].length() ) {
				++i;
			}

		}
		int j;
		j = 0;
		while( j < heart.length() && p < letter.length() ) {
			if( heart.charAt(j) == letter.charAt(p) ) {
				++j;
			}
			++p;
		}

		boolean flag = i == list.length && j == 2;

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

		sc.close();
	}

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

	void debug(Object... os) {
		System.err.println(Arrays.deepToString(os));
	}
}


import java.util.*;
import java.io.*;

public class Main{

    BufferedReader in;
    StringTokenizer str = null;
    PrintWriter out;

    private String next() throws Exception{
    	while (str == null || !str.hasMoreElements())
    	    str = new StringTokenizer(in.readLine());
    	return str.nextToken();
    }

    private int nextInt() throws Exception{
	   return Integer.parseInt(next());
    }

    public void run() throws Exception{
    	in = new BufferedReader(new InputStreamReader(System.in));
    	out = new PrintWriter(System.out);
        int n = nextInt();
        String []a = new String[2 * n + 1];
        a[0] = "<3";
        for(int j = 1, i = 0; i < n; ++i) {
            a[j++] = next();
            a[j++] = "<3";
        }
        char []b = next().toCharArray();
        int m = b.length;
        int j = 0;
        for(int i = 0; i < n; ++i) {
            int at = 0;
            while(j < m && at < a[i].length()) {
                while(j < m && at < a[i].length() && a[i].charAt(at) == b[j]) {
                    ++j;
                    ++at;
                }
                if (at < a[i].length()) ++j;
            }
            if (j >= m) {
                if (i < n - 1) {
                    out.println("no");
                    out.close();
                    return;
                }
                if (at < a[i].length()) {
                    out.println("no");
                    out.close();
                    return;
                }
            }
        }
        out.println("yes");
        out.close();
    }

    public static void main(String args[]) throws Exception{
	   new Main().run();
    }
}


#include<bits/stdc++.h>
using namespace std;
class contest
{
    public:
        long index,count,i,j;
        char s[100];
        void segment(long n)
        {
            index=0;
            count=0;
            while(n>0)
            {
                if(n>=6)
                {
                    s[index]='9';
                    index++;
                    n=n-6;
                    count++;
                }
                else if(n==5)
                {
                    s[index]='7';
                    index++;
                    n=n-3;
                    s[index]='1';
                    index++;
                    n=n-2;
                    count=count+2;
                }
                else if(n==4)
                {
                    s[index]='1';
                    index++;
                    n=n-2;
                    s[index]='1';
                    index++;
                    n=n-2;
                    count=count+2;
                }
                else if(n==3)
                {
                    s[index]='7';
                    index++;
                    n=n-3;
                    count++;
                }
                else if(n==2)
                {
                    s[index]='1';
                    index++;
                    n=n-2;
                    count++;
                }
                else
                {
                    break;
                }
            }
            s[index]='\0';
            for(j=0;j<count;j++)
            {
                cout<<s[j];
            }
            cout<<" ";
        }
};
int main()
{
    long t,i,n;
    cin>>t;
    contest obj[t];
    for(i=0;i<t;i++)
    {
        cin>>n;
        obj[i].segment(n);
    }
}


#include<bits/stdc++.h>
using namespace std;
class contest
{
    public:
        long index,count,i,j;
        char s[1000000];
        void segment(long n)
        {
            index=0;
            count=0;
            while(n>0)
            {

                    if(n==7)
                    {
                        s[index]='7';
                        index++;
                        s[index]='1';
                        index++;
                        s[index]='1';
                        index++;
                        n=n-7;
                        count=count+3;
                    }
                    else if(n>=6)
                    {
                        s[index]='9';
                        index++;
                        n=n-6;
                        count++;
                    }
                    else if(n==5)
                    {
                        s[index]='7';
                        index++;
                        n=n-3;
                        s[index]='1';
                        index++;
                        n=n-2;
                        count=count+2;
                    }
                    else if(n==4)
                    {
                        s[index]='1';
                        index++;
                        n=n-2;
                        s[index]='1';
                        index++;
                        n=n-2;
                        count=count+2;
                    }
                    else if(n==3)
                    {
                        s[index]='7';
                        index++;
                        n=n-3;
                        count++;
                    }
                    else if(n==2)
                    {
                        s[index]='1';
                        index++;
                        n=n-2;
                        count++;
                    }
            }
                s[index]='\0';
                for(j=0;j<count;j++)
                {
                    cout<<s[j];
                }

            cout<<" ";
        }
};
int main()
{
    long t,i,n;
    cin>>t;
    contest obj[t];
    for(i=0;i<t;i++)
    {
        cin>>n;
        obj[i].segment(n);
    }
}


#include<bits/stdc++.h>
using namespace std;
class contest
{
    public:
        long index,count,i,j;
        char s[100];
        void segment(long n)
        {
            index=0;
            count=0;
            for(i=0;n>0;i++)
            {
                if(n==6)
                {
                    s[index]='9';
                    index++;
                    n=n-6;
                    count++;
                }
                else if(n==5)
                {
                    s[index]='7';
                    index++;
                    n=n-3;
                    s[index]='1';
                    index++;
                    n=n-2;
                    count=count+2;
                }
                else if(n==4)
                {
                    s[index]='1';
                    index++;
                    n=n-2;
                    s[index]='1';
                    index++;
                    n=n-2;
                    count=count+2;
                }
                else if(n==3)
                {
                    s[index]='7';
                    index++;
                    n=n-3;
                    count++;
                }
                else if(n==2)
                {
                    s[index]='1';
                    index++;
                    n=n-2;
                    count++;
                }
                else if(n==1)
                {
                    n--;
                }
            }
            s[index]='\0';
            for(j=0;j<count;j++)
            {
                cout<<s[j];
            }
            cout<<" ";
        }
};
int main()
{
    long t,i,n;
    cin>>t;
    contest obj[t];
    for(i=0;i<t;i++)
    {
        cin>>n;
        obj[i].segment(n);
    }
}


#include<bits/stdc++.h>
using namespace std;
class contest
{
    public:
        long index,count,i,j;
        char s[1000000];
        void segment(long n)
        {
            index=0;
            count=0;
            while(n>0)
            {
                if(n==7)
                {
                    s[index]='7';
                    index++;
                    s[index]='1';
                    index++;
                    s[index]='1';
                    index++;
                    n=n-7;
                }
                else if(n>=6)
                {
                    s[index]='9';
                    index++;
                    n=n-6;
                    count++;
                }
                else if(n==5)
                {
                    s[index]='7';
                    index++;
                    n=n-3;
                    s[index]='1';
                    index++;
                    n=n-2;
                    count=count+2;
                }
                else if(n==4)
                {
                    s[index]='1';
                    index++;
                    n=n-2;
                    s[index]='1';
                    index++;
                    n=n-2;
                    count=count+2;
                }
                else if(n==3)
                {
                    s[index]='7';
                    index++;
                    n=n-3;
                    count++;
                }
                else if(n==2)
                {
                    s[index]='1';
                    index++;
                    n=n-2;
                    count++;
                }
            }
            s[index]='\0';
            for(j=0;j<count;j++)
            {
                cout<<s[j];
            }
            cout<<" ";
        }
};
int main()
{
    long t,i,n;
    cin>>t;
    contest obj[t];
    for(i=0;i<t;i++)
    {
        cin>>n;
        obj[i].segment(n);
    }
}


#include<bits/stdc++.h>
using namespace std;
class contest
{
    public:
        long index,count,i,j;
        char s[100];
        void segment(long n)
        {
            index=0;
            count=0;
            for(i=0;n>0;i++)
            {
                if(n==6)
                {
                    s[index]='9';
                    index++;
                    n=n-6;
                    count++;
                }
                else if(n==5)
                {
                    s[index]='7';
                    index++;
                    n=n-3;
                    s[index]='1';
                    index++;
                    n=n-2;
                    count=count+2;
                }
                else if(n==4)
                {
                    s[index]='1';
                    index++;
                    n=n-2;
                    s[index]='1';
                    index++;
                    n=n-2;
                    count=count+2;
                }
                else if(n==3)
                {
                    s[index]='7';
                    index++;
                    n=n-3;
                    count++;
                }
                else if(n==2)
                {
                    s[index]='1';
                    index++;
                    n=n-2;
                    count++;
                }
                else
                {
                    break;
                }
            }
            s[index]='\0';
            for(j=0;j<count;j++)
            {
                cout<<s[j];
            }
            cout<<" ";
        }
};
int main()
{
    long t,i,n;
    cin>>t;
    contest obj[t];
    for(i=0;i<t;i++)
    {
        cin>>n;
        obj[i].segment(n);
    }
}


#include<bits/stdc++.h>
using namespace std;
class contest
{
    public:
        int index,count,j,n;
        char s[100];
        void segment(int p)
        {
            index=0;
            count=0;
            for(n=p;n>0;n--)
            {
                if(n==6)
                {
                    s[index]='9';
                    index++;
                    n=n-6;
                    count++;
                }
                else if(n==5)
                {
                    s[index]='7';
                    index++;
                    n=n-3;
                    s[index]='1';
                    index++;
                    n=n-2;
                    count=count+2;
                }
                else if(n==4)
                {
                    s[index]='1';
                    index++;
                    n=n-2;
                    s[index]='1';
                    index++;
                    n=n-2;
                    count=count+2;
                }
                else if(n==3)
                {
                    s[index]='7';
                    index++;
                    n=n-3;
                    count++;
                }
                else if(n==2)
                {
                    s[index]='1';
                    index++;
                    n=n-2;
                    count++;
                }
            }
            s[index]='\0';
            for(j=0;j<count;j++)
            {
                cout<<s[j];
            }
            cout<<" ";
        }
};
int main()
{
    int t,i,n;
    cin>>t;
    contest obj[t];
    for(i=0;i<t;i++)
    {
        cin>>n;
        obj[i].segment(n);
    }
}


#include<bits/stdc++.h>
using namespace std;
class contest
{
    public:
        long index,count,i,j;
        string s[1000000];
        void segment(long n)
        {
            index=0;
            count=0;
            while(n>0)
            {
                if(n>=6)
                {
                    s[index]='9';
                    index++;
                    n=n-6;
                    count++;
                }
                else if(n==5)
                {
                    s[index]='7';
                    index++;
                    n=n-3;
                    s[index]='1';
                    index++;
                    n=n-2;
                    count=count+2;
                }
                else if(n==4)
                {
                    s[index]='1';
                    index++;
                    n=n-2;
                    s[index]='1';
                    index++;
                    n=n-2;
                    count=count+2;
                }
                else if(n==3)
                {
                    s[index]='7';
                    index++;
                    n=n-3;
                    count++;
                }
                else if(n==2)
                {
                    s[index]='1';
                    index++;
                    n=n-2;
                    count++;
                }
            }
            s[index]='\0';
            for(j=0;j<count;j++)
            {
                cout<<s[j];
            }
            cout<<" ";
        }
};
int main()
{
    long t,i,n;
    cin>>t;
    contest obj[t];
    for(i=0;i<t;i++)
    {
        cin>>n;
        obj[i].segment(n);
    }
}