One time, group master organized nekoTeam to travel, he always send a person to toilet before arriving a scene, and the rest of the people continued to move forward.
The scenes are numbered from 1 to n, nekoTeam was going from scene 1 to scene n.
The first line contains an integer T, indicate the number of test cases.
The first line of each test case contains four integer: n m a b, separated by spaces (1 <= n, a, b <= 40), represents the number of scenes, paths, boys, girls.
The second line is string consists of n characters, the i-th character indicate the toilet type of the i-th scene, 'A' for men's room, 'B' for women's room.
The next m lines each contains two positive integers u v, indicate there is a two-way path between scene u and scene v. There is no multiple-paths and self-paths
For each test case, if anyone can go to senario n, output "yes", otherwise "no".