You can perform the following operations on the string, :
Given two strings, and , determine if it's possible to make equal to as described. If so, print YES on a new line. Otherwise, print NO.
For example, given and , in we can convert and delete to match . If and , matching is not possible because letters may only be capitalized or discarded, not changed.
Complete the function in the editor below. It must return either or .
abbreviation has the following parameter(s):
The first line contains a single integer , the number of queries.
Each of the next pairs of lines is as follows:
- The first line of each query contains a single string, .
- The second line of each query contains a single string, .
For each query, print YES on a new line if it's possible to make string equal to string . Otherwise, print NO.
We have daBcd and ABC. We perform the following operation:
Because we were able to successfully convert to , we print YES on a new line.