if __name__ == \'__main__\': n = int(input()) for _ in range(n): #n is the number of inputs queue = dict(x.split() for x in input().splitlines()) #queue