T = int(input())
for tc in range(1, T + 1):
    num_list = list(map(int, input().split()))
    maxV = num_list[0]
    for num in num_list:
        if maxV < num:
            maxV = num
    print('#{} {}'.format(tc, maxV))

6a497938bc4ac6f65b4c3cd6c575398d64f39b60
<mask token>

<mask token>
for tc in range(1, T + 1):
    num_list = list(map(int, input().split()))
    maxV = num_list[0]
    for num in num_list:
        if maxV < num:
            maxV = num
    print('#{} {}'.format(tc, maxV))

T = int(input())
for tc in range(1, T + 1):
    num_list = list(map(int, input().split()))
    maxV = num_list[0]
    for num in num_list:
        if maxV < num:
            maxV = num
    print('#{} {}'.format(tc, maxV))
