/*
 * F.cpp
 *
 *  Created on: Oct 5, 2012
 *      Author: carber
 */

#include <iostream>
#include <cstdio>
#include <cstring>
#include <cstdlib>
#include <cmath>
#include <algorithm>

using namespace std;

bool dp[1010][1010];
int fasf[1010][1010];
int slow[1010][1010];

int main(void)
{
    memset(dp, false, sizeof(dp));
    int n = 1000;
    memset(fasf, -1, sizeof(fasf));
    memset(slow, - 1, sizeof(slow));
    fasf[0][0] = 0;
    for(int i = 1; i <= n; ++i)
    {
        dp[0][i] = dp[i][0] = true;
        slow[0][i] = slow[i][0] = 1;
    }
    for(int i = 0; i <= n; ++i)
    {
        for(int j = 0; j <= n; ++j)
        {
            if(i >= j)
            {
                int te = i - j;
                if(fasf[te][0] != -1)
                {
                    dp[i][j] = true;
                    if(fasf[i][j] == -1 || fasf[i][j] > fasf[te][0] + 1)
                        fasf[i][j] = fasf[te][0] + 1;
                }
                if(fasf[i][0] != -1)
                {
                    dp[i][j] = true;
                    if(fasf[i][j] == -1 || fasf[i][j] > fasf[i][0] + 1)
                        fasf[i][j] = fasf[i][0] + 1;
                }
                if(fasf[0][j] != -1)
                {
                    dp[i][j] = true;
                    if(fasf[i][j] == -1 || fasf[i][j] > fasf[0][j] + 1)
                        fasf[i][j] = fasf[0][j] + 1;
                }
                if(dp[i][j] == true)
                {
                    slow[te][0] = max(slow[te][0], fasf[i][j]);
                    slow[i][0] = max(slow[i][0], fasf[i][j]);
                    slow[0][j] = max(slow[0][j], fasf[i][j]);
                }
                else
                {
                    int th = max(slow[0][j], slow[i][0]);
                    th += 1;
                    if(slow[te][0] != -1 && slow[te][0] + 1 > th)
                        th = slow[te][0] + 1;
                    if(th < fasf[i][0])
                        fasf[i][0] = th;
                    if(th < fasf[0][j])
                        fasf[0][j] = th;
                    if(th < fasf[te][0])
                        fasf[te][0] = th;
                }
            }
            else
            {
                int te = j - i;
                if(fasf[0][te] != -1)
                {
                    dp[i][j] = true;
                    if(fasf[i][j] == -1 || fasf[i][j] > fasf[0][te])
                        fasf[i][j] = fasf[0][te];
                }
                if(fasf[i][0] != -1)
                {
                    dp[i][j] = true;
                    if(fasf[i][j] == -1 || fasf[i][j] > fasf[i][0])
                        fasf[i][j] = fasf[i][0];
                }
                if(fasf[0][j] != -1)
                {
                    dp[i][j] = true;
                    if(fasf[i][j] == -1 || fasf[i][j] > fasf[0][j])
                        fasf[i][j] = fasf[0][j];
                }
                if(dp[i][j] == true)
                {
                    slow[0][te] = max(slow[0][te], fasf[i][j]);
                    slow[i][0] = max(slow[i][0], fasf[i][j]);
                    slow[0][j] = max(slow[0][j], fasf[i][j]);
                }
                else
                {
                    int th = max(slow[0][j], slow[i][0]);
                    th += 1;
                    if(slow[0][te] != -1 && slow[0][te] + 1 > th)
                        th = slow[0][te] + 1;
                    if(th < fasf[i][0])
                        fasf[i][0] = th;
                    if(th < fasf[0][j])
                        fasf[0][j] = th;
                    if(th < fasf[0][te])
                        fasf[0][te] = th;
                }
            }
        }
    }
    int t;
    scanf("%d", &t);
    while(t--)
    {
        int n, m, k;
        scanf("%d %d %d", &n, &m, &k);
        if(dp[n][m])
        {
            printf("Sita %d\n", fasf[n][m] + k * 2);
        }
        else
            printf("Gita %d\n", slow[n][m]);
    }
    return 0;
}