K1. MST(a.k.a. Most Shortened Terms)
time limit per test
1 second
memory limit per test
256 megabytes
input
standard input
output
standard output

During a programming contest, Mr. Shocking Tale (a.k.a. MST) was accused of stealing code. To prove his innocence, he shouted: "My algorithm is original! It's literally called M... S... T...!"

The judges, however, noticed that every time he wrote "MST", the three-word expansion changed randomly. Was this a clever trick or just chaos?

One judge even snorted: "Yesterday it was Mangoes Squeeze Time, today it's Mice Sing Telepathically... Next, you'll say it's Minimum Spanning Tree!"

Whatever, to prove his correctness, given three words, determine if their initials form MST (i.e., each word starts with M, S, T in order).

Input

There are multiple test cases. The first line of the input contains a single integer $$$t$$$ $$$(1 \leq t \leq 100)$$$, denoting the number of test cases. For each test case:

The first line contains three integers $$$n, m, p$$$ $$$(1 \leq n, m, p \leq 20)$$$, denoting the length of the given three words.

The second line contains three strings consisting of uppercase and lowercase letters, denoting the given three words.

It's guaranteed that the initials of the three words are uppercase letters.

Output

For each test case, output YES if their initials form MST. Otherwise, output NO.

You may print each letter in any case (Yes, yes, Yes will all be recognized as a positive answer,  No, no, nO will all be recognized as a negative answer).

Examples
Input
2
4 6 9
Most Stupid Technique
6 6 4
Failed System Test
Output
YES
NO
Input
5
2 8 3
My Solution TLE
7 5 7
Missing Snack Tragedy
5 10 10
Coins Collecting Foundation
7 4 6
Awkward Code Merges
8 13 4
Counting Combinatorial Bits
Output
YES
YES
NO
NO
NO
Note

For the first sample test case, the initials of the first three words form MST, but the next three words form FST.

The sample cases here are solely intended to aid understanding of the problem. Any resemblance is purely coincidental.