public static void main(String[] argv) {
    Random gen = new Random();
    for (int times = 0; times < 1000; ++times) {
      int n;
      if (argv.length == 1) {
        n = Integer.parseInt(argv[0]);
      } else {
        n = gen.nextInt(1000) + 1;
      }

      pnode_t<Integer> L = null;
      pnode_t<Integer> curr = L;
      for (int i = 0; i < n; ++i) {
        pnode_t<Integer> temp = new pnode_t<Integer>(i, null, null);
        if (L != null) {
          curr.next = temp;
          curr = temp;
        } else {
          curr = L = temp;
        }

        // Randomly assigned a jump node.
        int jump_num = (i > 0)?gen.nextInt(i):0;
        pnode_t<Integer> jump = L;
        while (jump_num-- != 0) {
          jump = jump.next;
        }
        temp.jump = jump;
      }

      pnode_t<Integer> copied = copy_postings_list(L);
      check_postings_list_equal(L, copied);
    }
  }