The first line of the input contains an integer T, denoting the number of testcases. Then T test cases follow.
For each test case, the first line contains two integers N (2<=N<=10^5) and M (1<=M<N).
Each of the following (N - 1) lines contains ai, bi, ci denoting an edge between vertex ai and bi with character ci (1<=ai, bi<=n).The vertices are conveniently labled with 1, 2,……, n. ci is either 'a' or 'b'.
The last two lines contain string L and R (|L| = |R| = M, L<=R). L and R consist of 'a' and 'b'.