{"trustable":true,"sections":[{"title":"","value":{"format":"MD","content":"This is the tale of Zephyr, the greatest time traveler the world will never know. Even those who are aware of Zephyr\u0027s existence know very little about her. For example, no one has any clue as to which time-period she is originally from.\n\nBut we do know the story of the first time she set out to chart her own path in the time stream. Zephyr had just finished building her time machine which she named - \"Dokhina Batash\". She was making the final adjustments for her first trip when she noticed that a vital program was not working properly. The program was supposed to take a number **N** and find what Zephyr called its Onoroy value.\n\nThe Onoroy value of an integer **N** is the number of ones in its binary representation. For example, the number 13 (1101\u003csub\u003e2\u003c/sub\u003e) has an Onoroy value of 3. Needless to say, this was an easy problem for the great mind of Zephyr. She solved it quickly and was on her way.\n\nYou are now given a similar task. Find the first number after **N** which has the same Onoroy value as **N**."}},{"title":"Input","value":{"format":"MD","content":"Input starts with an integer **T (\u0026le; 65)**, denoting the number of test cases.\n\nEach case begins with an integer **N (1 \u0026le; N \u0026le; 10\u003csup\u003e9\u003c/sup\u003e)**."}},{"title":"Output","value":{"format":"MD","content":"For each case of input you have to print the case number and the desired result."}},{"title":"Sample","value":{"format":"HTML","content":"\u003ctable class\u003d\u0027vjudge_sample\u0027\u003e\n\u003cthead\u003e\n \u003ctr\u003e\n \u003cth\u003eInput\u003c/th\u003e\n \u003cth\u003eOutput\u003c/th\u003e\n \u003c/tr\u003e\n\u003c/thead\u003e\n\u003ctbody\u003e\n \u003ctr\u003e\n \u003ctd\u003e\u003cpre\u003e5\n23\n14232\n391\n7\n8\n\u003c/pre\u003e\u003c/td\u003e\n \u003ctd\u003e\u003cpre\u003eCase 1: 27\nCase 2: 14241\nCase 3: 395\nCase 4: 11\nCase 5: 16\n\u003c/pre\u003e\u003c/td\u003e\n \u003c/tr\u003e\n\u003c/tbody\u003e\n\u003c/table\u003e\n"}}]}