# Arup Guha
# 4/26/2025
# Solution to COP 4516 Final Team Contest Problem: Fizz Buzz, Cuzz

# Process cases.
nC = int(input())
for loop in range(nC):

    # Parse out all input.
    toks = input().split()
    fizz = int(toks[0])
    buzz = int(toks[1])
    cuzz = int(toks[2])
    start = int(toks[3])
    end = int(toks[4])

    # Go through the bounds.
    for i in range(start, end+1):

        # Just follow the rules!
        if i%fizz == 0:
            print("FIZZ")
        elif i%buzz == 0:
            print("BUZZ")
        elif i%cuzz == 0:
            print("CUZZ")
        else:
            print(i)
