Given two strings X and Y (call letters in uppercase). Check if it is possible to convert X to Y by performing following operations.

- Make some lowercase letters uppercase.
- Delete all the lowercase letters.

**Input:**

First line of the input contains no of test cases **T**,the **T** test cases follow.

Each test case consist of 2 space separated integers **A** and **B** denoting the size of string **X** and **Y** respectively

The next two lines contain the 2 string **X** and **Y**.

**Output:**

For each test case print the "Yes" if it's possible to convert X to Y by performing following operations else "No".

**Constraints:**

1<=T<=200

1<=size(X),size(Y)<=100

'a'<=X[i]<='z'

'A'<=X[i] , Y[i]<='Z'

**Example:
Input :**

```
2
5 3
daBcd ABC
4 3
ABcd BCD
```**Output :**
Yes
No

Explanation :

Test Case 1: daBcd -> dABCd -> ABC Covert a and b at index 1 and 3 to upper case, delete the rest those are lowercase. We get the string Y so the output is: Yes.

Author: Nishant_Singh

If you have purchased any course from GeeksforGeeks then please ask your doubt on course discussion forum. You will get quick replies from GFG Moderators there.

VISHESHA SADU | 27 |

ghanshyam648 | 25 |

Biswajit3 | 21 |

karthik_kasaragadda | 20 |

tanya_sharma | 18 |

KshatriyaYash | 1066 |

nikhil_sojan | 978 |

lonecoder | 935 |

mazumderrohit8 | 864 |

SumitSingh27 | 832 |

blackshadows | 5327 |

Ibrahim Nash | 5215 |

akhayrutdinov | 5111 |

mb1973 | 4468 |

Quandray | 4444 |

Login to report an issue on this page.