Return a permutation of the integers from 0 to 2^n - 1 that begins with the given value start, where every pair of consecutive entries differs in exactly one bit, and the first and last entries also differ in exactly one bit.
Input: A JSON object {"n": <bit width>, "start": <first value>} with 0 <= start < 2^n.
Output: Return the permutation as an array beginning with start.
Input: {"n":2,"start":3}
Output: [3,2,0,1]
Explanation: XOR-ing the Gray sequence by 3 opens the cycle at 3.Input: {"n":3,"start":2}
Output: [2,3,1,0,4,5,7,6]
Explanation: The cycle begins at 2 and each step flips one bit.0 <= n <= 160 <= start < 2^n