input: def sierpinski_triangle(n: int) -> None:
      """ Generate the first n elements of the Sierpinski triangle.
      >>> sierpinski_triangle(6) 
         1  
        0 1  
       1 0 0  
      0 1 0 0  
     1 0 0 1 0  
    0 1 0 0 1 0  
      """
output:     triangle = [[1]]
      for i in range(1, n):
          row = [0] * (i + 1)
          for j in range(i + 1):
              if j == 0 or j == i:
                  row[j] = 1
              else:
                  row[j] = triangle[i-1][j-1] ^ triangle[i-1][j]
          triangle.append(row)
      
      max_width = len(' '.join(map(str, triangle[-1])))
      for row in triangle:
          print(' '.join(map(str, row)).center(max_width))