q=int(input()) for i in range(q): n,k=map(int,input().split()) v=1 d=0 while v