description: You are given two strings s and t, both consisting of lowercase English letters. You are going to type the string s character by character, from the first character to the last one.
  
  When typing a character, instead of pressing the button corresponding to it, you can press the "Backspace" button. It deletes the last character you have typed among those that aren't deleted yet (or does nothing if there are no characters in the current string). For example, if s is "abcbd" and you press Backspace instead of typing the first and the fourth characters, you will get the string "bd" (the first press of Backspace deletes no character, and the second press deletes the character 'c'). Another example, if s is "abcaa" and you press Backspace instead of the last two letters, then the resulting text is "a".
  
  Your task is to determine whether you can obtain the string t, if you type the string s and press "Backspace" instead of typing several (maybe zero) characters of s.
  
  Input
  
  The first line contains a single integer q (1 ≤ q ≤ 10^5) — the number of test cases.
  
  The first line of each test case contains the string s (1 ≤ |s| ≤ 10^5). Each character of s is a lowercase English letter.
  
  The second line of each test case contains the string t (1 ≤ |t| ≤ 10^5). Each character of t is a lowercase English letter.
  
  It is guaranteed that the total number of characters in the strings over all test cases does not exceed 2 ⋅ 10^5.
  
  Output
  
  For each test case, print "YES" if you can obtain the string t by typing the string s and replacing some characters with presses of "Backspace" button, or "NO" if you cannot.
  
  You may print each letter in any case (YES, yes, Yes will all be recognized as positive answer, NO, no and nO will all be recognized as negative answer).
  
  Example
  
  Input
  
  
  4
  ababa
  ba
  ababa
  bb
  aaa
  aaaa
  aababa
  ababa
  
  
  Output
  
  
  YES
  NO
  NO
  YES
  
  Note
  
  Consider the example test from the statement.
  
  In order to obtain "ba" from "ababa", you may press Backspace instead of typing the first and the fourth characters.
  
  There's no way to obtain "bb" while typing "ababa".
  
  There's no way to obtain "aaaa" while typing "aaa".
  
  In order to obtain "ababa" while typing "aababa", you have to press Backspace instead of typing the first character, then type all the remaining characters.
solution: 
  
  
      import java.io.*;
      import java.util.*;
      import java.io.BufferedReader;
      import java.io.IOException;
      import java.util.Collections;
      import java.io.InputStreamReader;
      import static java.lang.Math.*;
      import static java.lang.System.*;
  
      public class Main1 {
  
  
  
  
  
          public static void main(String[] args) throws IOException {
  
      //       try {
             // Scanner in = new Scanner(System.in) ;
               FastScanner in = new FastScanner();
             PrintWriter out = new PrintWriter(System.out);
  
              int t = in.nextInt() ;
              while (t-- > 0){
                  char a[] = in.next().toCharArray() ;
                  char b[] = in.next().toCharArray() ;
                  int n = a.length-1 ;
                  int m = b.length-1 ;
  
                  while (n >=0 && m >=0){
                      if (a[n] == b[m]){
                          n-- ;
                          m-- ;
                      }
                      else n -= 2 ;
                  }
                  if (m <0){
                      System.out.println("YES");
                  }
                  else System.out.println("NO");
  
              }
  
  
  
  
              
  
  
  
              out.flush();
              out.close();
  
          }
      //        catch (Exception e){
      //            return;
      //        }
      //
      //    }
  
          static long gcd(long a, long b) {
              return (b == 0) ? a : gcd(b, a % b);
          }
  
          static int gcd(int a, int b) {
              return (b == 0) ? a : gcd(b, a % b);
          }
  
          static void sort(int ar[]) {
              int n = ar.length;
              ArrayList<Integer> a = new ArrayList<>();
              for (int i = 0; i < n; i++)
                  a.add(ar[i]);
              Collections.sort(a);
              for (int i = 0; i < n; i++)
                  ar[i] = a.get(i);
          }
  
          static void sort1(long ar[]) {
              int n = ar.length;
              ArrayList<Long> a = new ArrayList<>();
              for (int i = 0; i < n; i++)
                  a.add(ar[i]);
              Collections.sort(a);
              for (int i = 0; i < n; i++)
                  ar[i] = a.get(i);
          }
  
          static long ncr(long n, long r, long mod) {
              if (r == 0)
                  return 1;
              long val = ncr(n - 1, r - 1, mod);
              val = (n * val) % mod;
              val = (val * modInverse(r, mod)) % mod;
              return val;
          }
  
          static long fast_pow(long base, long n, long M) {
              if (n == 0)
                  return 1;
              if (n == 1)
                  return base % M;
              long halfn = fast_pow(base, n / 2, M);
              if (n % 2 == 0)
                  return (halfn * halfn) % M;
              else
                  return (((halfn * halfn) % M) * base) % M;
          }
  
          static long modInverse(long n, long M) {
              return fast_pow(n, M - 2, M);
          }
  
      // ======================================================================================================
  
  
  
          static class FastOutput implements AutoCloseable, Closeable, Appendable {
              private static final int THRESHOLD = 32 << 10;
              private final Writer os;
              private StringBuilder cache = new StringBuilder(THRESHOLD * 2);
  
              public FastOutput append(CharSequence csq) {
                  cache.append(csq);
                  return this;
              }
  
              public FastOutput append(CharSequence csq, int start, int end) {
                  cache.append(csq, start, end);
                  return this;
              }
  
              private void afterWrite() {
                  if (cache.length() < THRESHOLD) {
                      return;
                  }
                  flush();
              }
  
              public FastOutput(Writer os) {
                  this.os = os;
              }
  
              public FastOutput(OutputStream os) {
                  this(new OutputStreamWriter(os));
              }
  
              public FastOutput append(char c) {
                  cache.append(c);
                  afterWrite();
                  return this;
              }
  
              public FastOutput append(long c) {
                  cache.append(c);
                  afterWrite();
                  return this;
              }
  
              public FastOutput append(String c) {
                  cache.append(c);
                  afterWrite();
                  return this;
              }
  
              public FastOutput println() {
                  return append(System.lineSeparator());
              }
  
              public FastOutput flush() {
                  try {
                      //            boolean success = false;
                      //            if (stringBuilderValueField != null) {
                      //                try {
                      //                    char[] value = (char[]) stringBuilderValueField.get(cache);
                      //                    os.write(value, 0, cache.length());
                      //                    success = true;
                      //                } catch (Exception e) {
                      //                }
                      //            }
                      //            if (!success) {
                      os.append(cache);
                      //            }
                      os.flush();
                      cache.setLength(0);
                  } catch (IOException e) {
                      throw new UncheckedIOException(e);
                  }
                  return this;
              }
  
              public void close() {
                  flush();
                  try {
                      os.close();
                  } catch (IOException e) {
                      throw new UncheckedIOException(e);
                  }
              }
  
              public String toString() {
                  return cache.toString();
              }
  
          }
  
  
          static class FastScanner {
              BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
              StringTokenizer st = new StringTokenizer("");
  
              String next() {
                  while (!st.hasMoreTokens())
                      try {
                          st = new StringTokenizer(br.readLine());
                      } catch (IOException e) {
                          e.printStackTrace();
                      }
                  return st.nextToken();
              }
  
              int nextInt() {
                  return Integer.parseInt(next());
              }
  
              int[] readArray(int n) {
                  int[] a = new int[n];
                  for (int i = 0; i < n; i++) a[i] = nextInt();
                  return a;
              }
  
  
              long nextLong() {
                  return Long.parseLong(next());
              }
          }
  
  
      }
  
  
  
  
  
  
  
  