Koishi is playing a game with Satori.
There is an array of length $10^{18}$. In the game, Koishi and Satori take turns operating on this array, and Koishi goes first. When it comes to a player's turn, if there is only one element left in the array, she loses the game immediately. Otherwise, she needs to delete either the leftmost number or the rightmost number of the remaining array.
It is too boring for Koishi, so she comes up with the following rules.
There are $n$ sub-segments of this array that are special. Specifically, the $i$-th sub-segment is described by three integers $(l_i,r_i,z_i)$, which means that when it comes to a player's turn, if the remaining array is the sub-segment $[l_i,r_i]$, she will win immediately if $z_i=1$ or lose immediately if $z_i=0$. Moreover, if there is a special sub-segment $(x,x,1)$, then the player will immediately win when the remaining array is $[x,x]$ (In default case, when there is only one number, the player will lose).
There will be $q$ games, At the beginning of the $i$-th game, Utuoho will give two players the sub-segment $[a_i,b_i]$ and take away all other parts of the array. That means Koishi and Satori only play on subsegment $[a_i,b_i]$. All the $q$ games are independent.
Two players always use the optimal strategy. Please tell them who will win in each game.