# coding: utf-8 # Your code here! N=int(input()) for _ in range(N): A,B,C=map(int,input().split()) ans=0 if (B>A and B>C) or (B