Given an integer n in the input, find its next sparse binary number.A sparse binary number is a number whose binary representation does not contain any consecutive 1s.
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 next Sparse binary number,if the input number is not sparse else print the number itself.
1 ≤ T ≤ 100
1 ≤ n ≤ 100000
If you have purchased any course from GeeksforGeeks then please ask your doubt on course discussion forum. You will get quick replies from GFG Moderators there.