output_description: In the first line, print an integer $m$. In the second line, print $m$
  integers $G_i (i=0,1,...,m-1)$ separated by single space character in a line.  
  In the third line, print cnt in a line. In the following $n$ lines, print $A_i
  (i=0,1,...,n-1)$ respectively.
  
  This problem has multiple solutions and the judge will be performed by a
  special validator.
input_description: In the first line, an integer $n$ is given. In the following $n$ lines, $A_i
  (i=0,1,...,n-1)$ are given for each line.
attempt: class Shellsort:
      def __init__(self, x, n):
          self.x = x
          self.n = n
  
      def sorting(self):
          self.cnt = 0
          self.G = [1]
          i = 0
          while 1:
              z = self.G[i] * 3 + 1
              if z > self.n or len(self.G) == 20:
                  break
              self.G.append(z)
              i += 1
  
          self.G.sort(reverse=True)
          self.m = len(self.G)
          for i in range(self.m):
              self.insertation(self.G[i])
          return self
  
      def insertation(self, g):
          for i in range(g, self.n):
              v = self.x[i]
              j = i - g
              while j >= 0 and self.x[j] > v:
                  self.x[j + g] = x[j]
                  j = j - g
                  self.cnt += 1
              self.x[j + g] = v
  
  
  n = int(input())
  x = [0] * n
  for i in range(n):
      x[i] = int(input())
  
  a = Shellsort(x, n).sorting()
  
  print(a.m)
  L = [str(i) for i in a.G]
  print(" ".join(L))
  print(a.cnt)
  for i in a.x:
      print(i)
  
problem_description: Shell Sort
  
  Shell Sort is a generalization of Insertion Sort to arrange a list of $n$
  elements $A$.
  
      
      
      1  insertionSort(A, n, g)
      2      for i = g to n-1
      3          v = A[i]
      4          j = i - g
      5          while j >= 0 && A[j] > v
      6              A[j+g] = A[j]
      7              j = j - g
      8              cnt++
      9          A[j+g] = v
      10
      11 shellSort(A, n)
      12     cnt = 0
      13     m = ?
      14     G[] = {?, ?,..., ?}
      15     for i = 0 to m-1
      16         insertionSort(A, n, G[i])
      
  
  A function shellSort(A, n) performs a function insertionSort(A, n, g), which
  considers every $g$-th elements. Beginning with large values of $g$, it
  repeats the insertion sort with smaller $g$.
  
  Your task is to complete the above program by filling ?. Write a program which
  reads an integer $n$ and a sequence $A$, and prints $m$, $G_i (i = 0, 1, ...,
  m − 1)$ in the pseudo code and the sequence $A$ in ascending order. The output
  of your program must meet the following requirements:
  
    * $1 \leq m \leq 100$
    * $0 \leq G_i \leq n$
    * cnt does not exceed $\lceil n^{1.5}\rceil$
samples: [{"input": "5\n    5\n    1\n    4\n    3\n    2", "output": "2\n    4 1\n    3\n    1\n    2\n    3\n    4\n    5"}, {"input": "3\n    3\n    2\n    1", "output": "1\n    1\n    3\n    1\n    2\n    3"}]