#include <bits/stdc++.h>
using namespace std;
struct node {
  int x, y, z;
  node(int _x, int _y, int _z) {
    x = _x;
    y = _y;
    z = _z;
  }
};
struct Node {
  int x, y, z, k;
  Node(int _x, int _y, int _z, int _k) {
    x = _x;
    y = _y;
    z = _z;
    k = _k;
  }
};
vector<node> ans3;
vector<Node> ans4;
vector<int> F[10000];
int cnt;
void work(vector<int>& G) {
  int m = G.size();
  if (m == 3) {
    ans3.push_back(node(G[0], G[1], G[2]));
    ans3.push_back(node(G[0], G[1], G[2]));
  } else if (m == 4) {
    ans3.push_back(node(G[0], G[1], G[2]));
    ans3.push_back(node(G[1], G[2], G[3]));
    ans3.push_back(node(G[2], G[3], G[0]));
    ans3.push_back(node(G[3], G[0], G[1]));
  } else if (m == 5) {
    ans3.push_back(node(G[4], G[3], G[1]));
    ans3.push_back(node(G[2], G[0], G[4]));
    ans4.push_back(Node(G[3], G[4], G[1], G[2]));
    ans4.push_back(Node(G[3], G[2], G[1], G[0]));
    ans3.push_back(node(G[3], G[1], G[0]));
    ans3.push_back(node(G[2], G[0], G[4]));
  } else if (m == 6) {
    ans4.push_back(Node(G[0], G[1], G[3], G[4]));
    ans4.push_back(Node(G[1], G[2], G[4], G[5]));
    ans4.push_back(Node(G[2], G[3], G[5], G[0]));
    ans3.push_back(node(G[0], G[2], G[3]));
    ans3.push_back(node(G[1], G[3], G[4]));
    ans3.push_back(node(G[2], G[4], G[5]));
    ans3.push_back(node(G[3], G[5], G[0]));
    ans3.push_back(node(G[4], G[0], G[1]));
    ans3.push_back(node(G[5], G[1], G[2]));
  } else {
    if (m & 1) {
      ++cnt;
      for (int i = 0; i < G.size(); i += 2) F[cnt].push_back(G[i]);
      ++cnt;
      for (int i = 1; i < G.size(); i += 2) F[cnt].push_back(G[i]);
      for (int i = 0; i < F[cnt].size(); ++i) {
        for (int j = 0; j < F[cnt - 1].size(); ++j)
          ans3.push_back(node(F[cnt][i], F[cnt - 1][j],
                              F[cnt - 1][(j + i + 1) % (F[cnt - 1].size())]));
      }
      work(F[cnt]);
    } else {
      ++cnt;
      for (int i = 0; i < 4; ++i) F[cnt].push_back(G[i]);
      ++cnt;
      for (int i = 4; i < G.size(); ++i) F[cnt].push_back(G[i]);
      for (int i = 0; i < F[cnt - 1].size(); i += 2) {
        for (int j = 0; j < F[cnt].size(); j += 2) {
          ans4.push_back(
              Node(F[cnt - 1][i], F[cnt][j], F[cnt - 1][i + 1], F[cnt][j + 1]));
          ans4.push_back(
              Node(F[cnt - 1][i], F[cnt][j], F[cnt - 1][i + 1], F[cnt][j + 1]));
        }
      }
      work(F[cnt - 1]);
      work(F[cnt]);
    }
  }
}
int main() {
  int n;
  scanf("%d", &n);
  cnt = 0;
  for (int i = 1; i <= n; ++i) F[0].push_back(i);
  work(F[0]);
  printf("%d\n", ans3.size() + ans4.size());
  for (int i = 0; i < ans3.size(); ++i)
    printf("3 %d %d %d\n", ans3[i].x, ans3[i].y, ans3[i].z);
  for (int i = 0; i < ans4.size(); ++i)
    printf("4 %d %d %d %d\n", ans4[i].x, ans4[i].y, ans4[i].z, ans4[i].k);
  return 0;
}

### Prompt

In CPP, your task is to solve the following problem:

In order to fly to the Moon Mister B just needs to solve the following problem.

There is a complete indirected graph with n vertices. You need to cover it with several simple cycles of length 3 and 4 so that each edge is in exactly 2 cycles.

We are sure that Mister B will solve the problem soon and will fly to the Moon. Will you?

Input

The only line contains single integer n (3 ≤ n ≤ 300).

Output

If there is no answer, print -1.

Otherwise, in the first line print k (1 ≤ k ≤ n2) — the number of cycles in your solution.

In each of the next k lines print description of one cycle in the following format: first print integer m (3 ≤ m ≤ 4) — the length of the cycle, then print m integers v1, v2, ..., vm (1 ≤ vi ≤ n) — the vertices in the cycle in the traverse order. Each edge should be in exactly two cycles.

Examples

Input

3


Output

2
3 1 2 3
3 1 2 3


Input

5


Output

6
3 5 4 2
3 3 1 5
4 4 5 2 3
4 4 3 2 1
3 4 2 1
3 3 1 5

### Response

```cpp
#include <bits/stdc++.h>
using namespace std;
struct node {
  int x, y, z;
  node(int _x, int _y, int _z) {
    x = _x;
    y = _y;
    z = _z;
  }
};
struct Node {
  int x, y, z, k;
  Node(int _x, int _y, int _z, int _k) {
    x = _x;
    y = _y;
    z = _z;
    k = _k;
  }
};
vector<node> ans3;
vector<Node> ans4;
vector<int> F[10000];
int cnt;
void work(vector<int>& G) {
  int m = G.size();
  if (m == 3) {
    ans3.push_back(node(G[0], G[1], G[2]));
    ans3.push_back(node(G[0], G[1], G[2]));
  } else if (m == 4) {
    ans3.push_back(node(G[0], G[1], G[2]));
    ans3.push_back(node(G[1], G[2], G[3]));
    ans3.push_back(node(G[2], G[3], G[0]));
    ans3.push_back(node(G[3], G[0], G[1]));
  } else if (m == 5) {
    ans3.push_back(node(G[4], G[3], G[1]));
    ans3.push_back(node(G[2], G[0], G[4]));
    ans4.push_back(Node(G[3], G[4], G[1], G[2]));
    ans4.push_back(Node(G[3], G[2], G[1], G[0]));
    ans3.push_back(node(G[3], G[1], G[0]));
    ans3.push_back(node(G[2], G[0], G[4]));
  } else if (m == 6) {
    ans4.push_back(Node(G[0], G[1], G[3], G[4]));
    ans4.push_back(Node(G[1], G[2], G[4], G[5]));
    ans4.push_back(Node(G[2], G[3], G[5], G[0]));
    ans3.push_back(node(G[0], G[2], G[3]));
    ans3.push_back(node(G[1], G[3], G[4]));
    ans3.push_back(node(G[2], G[4], G[5]));
    ans3.push_back(node(G[3], G[5], G[0]));
    ans3.push_back(node(G[4], G[0], G[1]));
    ans3.push_back(node(G[5], G[1], G[2]));
  } else {
    if (m & 1) {
      ++cnt;
      for (int i = 0; i < G.size(); i += 2) F[cnt].push_back(G[i]);
      ++cnt;
      for (int i = 1; i < G.size(); i += 2) F[cnt].push_back(G[i]);
      for (int i = 0; i < F[cnt].size(); ++i) {
        for (int j = 0; j < F[cnt - 1].size(); ++j)
          ans3.push_back(node(F[cnt][i], F[cnt - 1][j],
                              F[cnt - 1][(j + i + 1) % (F[cnt - 1].size())]));
      }
      work(F[cnt]);
    } else {
      ++cnt;
      for (int i = 0; i < 4; ++i) F[cnt].push_back(G[i]);
      ++cnt;
      for (int i = 4; i < G.size(); ++i) F[cnt].push_back(G[i]);
      for (int i = 0; i < F[cnt - 1].size(); i += 2) {
        for (int j = 0; j < F[cnt].size(); j += 2) {
          ans4.push_back(
              Node(F[cnt - 1][i], F[cnt][j], F[cnt - 1][i + 1], F[cnt][j + 1]));
          ans4.push_back(
              Node(F[cnt - 1][i], F[cnt][j], F[cnt - 1][i + 1], F[cnt][j + 1]));
        }
      }
      work(F[cnt - 1]);
      work(F[cnt]);
    }
  }
}
int main() {
  int n;
  scanf("%d", &n);
  cnt = 0;
  for (int i = 1; i <= n; ++i) F[0].push_back(i);
  work(F[0]);
  printf("%d\n", ans3.size() + ans4.size());
  for (int i = 0; i < ans3.size(); ++i)
    printf("3 %d %d %d\n", ans3[i].x, ans3[i].y, ans3[i].z);
  for (int i = 0; i < ans4.size(); ++i)
    printf("4 %d %d %d %d\n", ans4[i].x, ans4[i].y, ans4[i].z, ans4[i].k);
  return 0;
}

```