Problem: You are given three strings s, t and p consisting of lowercase Latin letters. You may perform any number (possibly, zero) operations on these strings.

During each operation you choose any character from p, erase it from p and insert it into string s (you may insert this character anywhere you want: in the beginning of s, in the end or between any two consecutive characters). 

For example, if p is aba, and s is de, then the following outcomes are possible (the character we erase from p and insert into s is highlighted):

  * aba → ba, de → ade; 
  * aba → ba, de → dae; 
  * aba → ba, de → dea; 
  * aba → aa, de → bde; 
  * aba → aa, de → dbe; 
  * aba → aa, de → deb; 
  * aba → ab, de → ade; 
  * aba → ab, de → dae; 
  * aba → ab, de → dea; 



Your goal is to perform several (maybe zero) operations so that s becomes equal to t. Please determine whether it is possible.

Note that you have to answer q independent queries.

Input

The first line contains one integer q (1 ≤ q ≤ 100) — the number of queries. Each query is represented by three consecutive lines.

The first line of each query contains the string s (1 ≤ |s| ≤ 100) consisting of lowercase Latin letters.

The second line of each query contains the string t (1 ≤ |t| ≤ 100) consisting of lowercase Latin letters.

The third line of each query contains the string p (1 ≤ |p| ≤ 100) consisting of lowercase Latin letters.

Output

For each query print YES if it is possible to make s equal to t, and NO otherwise.

You may print every letter in any case you want (so, for example, the strings yEs, yes, Yes and YES will all be recognized as positive answer).

Example

Input


4
ab
acxb
cax
a
aaaa
aaabbcc
a
aaaa
aabbcc
ab
baaa
aaaaa


Output


YES
YES
NO
NO

Note

In the first test case there is the following sequence of operation: 

  1. s =  ab, t =  acxb, p =  cax; 
  2. s =  acb, t =  acxb, p =  ax; 
  3. s =  acxb, t =  acxb, p =  a. 



In the second test case there is the following sequence of operation: 

  1. s =  a, t =  aaaa, p =  aaabbcc; 
  2. s =  aa, t =  aaaa, p =  aabbcc; 
  3. s =  aaa, t =  aaaa, p =  abbcc; 
  4. s =  aaaa, t =  aaaa, p =  bbcc. 

Solution (in JAVA):

Solution:
import java.util.*;
import java.lang.*;
import java.io.*;
import java.math.*;
 
import java.util.*;
import java.lang.*;
import java.io.*;

@SuppressWarnings("unchecked")
public class Main implements Runnable {

  static BufferedReader in;
  static PrintWriter out;

  public static boolean isSubsequence(String srcStr, String destStr) {
    int i=0,j=0;
    boolean isSubseq=true;

    for(i=0;i<srcStr.length();i++) {
      while(j<destStr.length() && srcStr.charAt(i)!=destStr.charAt(j)) {
        j++;
      }
      if(j<destStr.length() && srcStr.charAt(i)==destStr.charAt(j)) {
        j++;
      }
      else {
        isSubseq=false;
        break;
      }
    }

    return isSubseq;
  }
 
  public static void main(String[] args) {
      new Thread(null, new Main(), "whatever", 1<<29).start();
  }
 
  public void run() {
    in = new BufferedReader(new InputStreamReader(System.in));
    out = new PrintWriter(System.out, false);
 
    try
    {
      // in = new BufferedReader(new FileReader("class_treasurer.txt"));
      // out = new PrintWriter("output.txt");

      int t,x1,n,m,i,j;
      String str,pStr,tStr,sStr;
      String[] token;

      str=in.readLine().trim();
      token=str.split(" ");
      t=Integer.parseInt(token[0]);

      for(x1=0;x1<t;x1++) {
        sStr=in.readLine().trim();
        tStr=in.readLine().trim();
        pStr=in.readLine().trim();

        int[] sStrCnt=new int[26];
        int[] tStrCnt=new int[26];
        int[] pStrCnt=new int[26];

        if(!isSubsequence(sStr,tStr)) {
          out.println("NO");
        }
        else {
          for(i=0;i<tStr.length();i++) {
            tStrCnt[tStr.charAt(i)-97]++;
          }

          for(i=0;i<sStr.length();i++) {
            tStrCnt[sStr.charAt(i)-97]--;
          }

          for(i=0;i<pStr.length();i++) {
            if(tStrCnt[pStr.charAt(i)-97]>0) {
              tStrCnt[pStr.charAt(i)-97]--;
            }
          }

          boolean ans=true;

          for(i=0;i<26;i++) {
            if(tStrCnt[i]!=0) {
              ans=false;
              break;
            }
          }

          out.println(ans ? "YES" : "NO");
        }
      }

      out.flush();
      out.close();
    }
    catch(Exception e) {
      e.printStackTrace();
    }
  }
}