Given a number, check whether it is sparse or not. A number is said to be a sparse number if in binary representation of the number no two or more consecutive bits are set.
The first line of input contains an integer T denoting the number of test cases. The first line of each test case is number 'N'.
Print '1' if the number is sparse and '0' if the number is not sparse.
1 <=T<= 100
1 <=n<= 100