# Arup Guha
# 2/10/2026
# Solution to COP 4516 Team Final Problem: Freezing

nC = int(input())

# Process cases.
for loop in range(nC):

    # Get input.
    toks = input().split()
    temp = int(toks[0])

    # Set our freezing limit.
    limit = 0
    if toks[1] == "F":
        limit = 32

    # Output accordingly.
    if temp < limit:
        print("below freezing")
    elif temp > limit:
        print("above freezing")
    else:
        print("exactly freezing")
