class Solution(object):
    def grayCode(self, n):
        """
        :type n: int
        :rtype: List[int]
        """
        m = 1<<n
        r=[]
        for i in range(m):
            r.append(i^(i>>1))
        return r

print(Solution().grayCode(10))


a3357e3813e15eb1c5e1e739cfaf4a6f83bf1b24
<mask token>

class Solution(object):
    <mask token>


<mask token>

class Solution(object):

    def grayCode(self, n):
        """
        :type n: int
        :rtype: List[int]
        """
        m = 1 << n
        r = []
        for i in range(m):
            r.append(i ^ i >> 1)
        return r


<mask token>

class Solution(object):

    def grayCode(self, n):
        """
        :type n: int
        :rtype: List[int]
        """
        m = 1 << n
        r = []
        for i in range(m):
            r.append(i ^ i >> 1)
        return r


print(Solution().grayCode(10))

class Solution(object):
    def grayCode(self, n):
        """
        :type n: int
        :rtype: List[int]
        """
        m = 1<<n
        r=[]
        for i in range(m):
            r.append(i^(i>>1))
        return r

print(Solution().grayCode(10))

