{"trustable":false,"sections":[{"title":"","value":{"format":"MD","content":"\u003cp\u003eAfter getting admitted into MIST, freshers are seen to take a lot of pictures. Most of the pictures contain the same thing- some students standing in a single line. The binary value of a picture of this kind is calculated by considering the group of students as a binary string where each boy is represented with a \u0027$0$\u0027 and each girl is represented with a \u0027$1$\u0027 from left to right.\u003c/p\u003e\n\u003cp\u003eGiven $n-$ the decimal value of a picture of CSE-23, find the lowest decimal value greater than $n$ of a picture containing exactly the same number of girls. Note that, the leftmost person cannot be a boy in any picture as the binary value of a picture sholdn\u0027t contain leading zero(s).\u003c/p\u003e"}},{"title":"Input","value":{"format":"MD","content":"\u003cp\u003eThe first line of the input contains an integer $T$ $(0≤T≤65)$ indicating the number of test cases.\nFor each test case, there is a single integer $n$ $(1≤n≤10^{9})-$ indicating the decimal value of the given picture.\u003c/p\u003e"}},{"title":"Output","value":{"format":"MD","content":"\u003cp\u003eFor each case of input you have to print the case number and the lowest decimal value greater than $n$ of a picture containing exactly the same number of girls.\u003c/p\u003e"}},{"title":"Sample","value":{"format":"MD","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\u003e4\n2\n3\n28\n647\n\u003c/pre\u003e\u003c/td\u003e\n \u003ctd\u003e\u003cpre\u003eCase 1: 4\nCase 2: 5\nCase 3: 35\nCase 4: 651\n\u003c/pre\u003e\u003c/td\u003e\n \u003c/tr\u003e\n\u003c/tbody\u003e\n\u003c/table\u003e\n"}}]}