# Arup Guha
# 2/18/2025
# Solution to Final Individual Contest Problem B: Carrying Power Strips

'''
Let a, b, and c be the input values for the case.
Option 1 takes 3a + 2b time
Option 2 takes 2a + a + 2c = 3a + 2c time

So, if      b < c, option 1 is better.
    else if c < b, option 2 is better.
    else    both take the same time
'''

# Get number of cases.
nC = int(input())

# Process cases.
for loop in range(nC):
        
    # Get all values.
    vals = [int(x) for x in input().split()]

    # First option is better.
    if vals[1] < vals[2]:
        print("1")

    # Second option is better.
    elif vals[2] < vals[1]:
        print("2")

    # Both take the same time.
    else:
        print("3")
