// Arup Guha
// 2/25/2020
// Solution to 2020 UCF HS Contest Problem: Typing Contest

import java.util.*;

public class typing {

    public static void main(String[] args) {

        Scanner stdin = new Scanner(System.in);
        int nC = Integer.parseInt(stdin.nextLine());

		// Process each case.
        for (int loop=0; loop<nC; loop++) {
			
			// Get s and t.
            StringTokenizer tok = new StringTokenizer(stdin.nextLine());
            int s = Integer.parseInt(tok.nextToken());
            int t = Integer.parseInt(tok.nextToken());
			
			// Get the line to type.
            String line = stdin.nextLine();

			// Compute the cost for both.
            int costS = getSharon(s, line);
            int costT = getOther(t, line);

			// Output appropriately.
            if (costS < costT)
                System.out.println("Sharon has won");
            else
                System.out.println("Sharon is gone");
        }
    }

	// Returns Sharon's cost for typing line with the factor s.
    public static int getSharon(int s, String line) {

        int curPress = 0;
		
		// Caps Lock key...
        boolean state = false;
		
		// Go through the line.
        for (int i=0; i<line.length(); i++) {
			
			// char to type.
            int c = line.charAt(i);
			
			// We have to press the caps lock.
            if (!state && c >= 'A' && c<='Z') {
                curPress++;
                state = !state;
            }
			
			// We have to "unpress" the caps lock.
            else if (state && c >= 'a' && c<='z') {
                curPress++;
                state = !state;
            }
        }

		// This is the total cost.
        return line.length()*s + curPress*s; 
    }

	// Returns the cost of the other student to type line with cost t.
    public static int getOther(int t, String line) {

		// Look at initial key to determine cost of first character.
        int numPress = line.charAt(0) >= 'A' && line.charAt(0) <='Z' ? 1 : 0;
        
		// Go thorugh pairs of characters, looking at the transition.
        for (int i=0; i<line.length()-1; i++) {
			
			// These are our consecutive characters.
            char a = line.charAt(i);
            char b = line.charAt(i+1);
			
			// We have to toggle...
            if (a >= 'a' && a <= 'z' && b >= 'A' && b <= 'Z')
                numPress++;
        }

		// The other student's cost.
        return line.length()*t + numPress*t;
    }
}