n=input() print'Gray code n=%d'%n for i in range(1<>1)[2:].zfill(n)