You can perform the following operations on the string, :
- Capitalize zero or more of 's lowercase letters.
- Delete all of the remaining lowercase letters in .
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
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):
- a: the string to modify
- b: the string to match
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, .
- String consists only of uppercase and lowercase English letters, ascii[A-Za-z].
- String consists only of uppercase English letters, ascii[A-Z].
For each query, print
YES on a new line if it's possible to make string equal to string . Otherwise, print
1 daBcd ABC
ABC. We perform the following operation:
- Capitalize the letters
cin so that
- Delete all the remaining lowercase letters in so that
Because we were able to successfully convert to , we print
YES on a new line.