#include <bits/stdc++.h>   clock_t t = clock();   namespace my_std {   using namespace std;   mt19937 rng(chrono::steady_clock::now().time_since_epoch().count());   template <typename T>   inline T rnd(T l, T r) {     return uniform_int_distribution<T>(l, r)(rng);   }   template <typename T>   inline bool chkmax(T& x, T y) {     return x < y ? x = y, 1 : 0;   }   template <typename T>   inline bool chkmin(T& x, T y) {     return x > y ? x = y, 1 : 0;   }   template <typename T>   inline void read(T& t) {     t = 0;     char f = 0, ch = getchar();     double d = 0.1;     while (ch >  9  || ch <  0 ) f |= (ch ==  - ), ch = getchar();     while (ch <=  9  && ch >=  0 ) t = t * 10 + ch - 48, ch = getchar();     if (ch ==  . ) {       ch = getchar();       while (ch <=  9  && ch >=  0 ) t += d * (ch ^ 48), d *= 0.1, ch = getchar();     }     t = (f ? -t : t);   }   template <typename T, typename... Args>   inline void read(T& t, Args&... args) {     read(t);     read(args...);   }   char __sr[1 << 21], __z[20];   int __C = -1, __zz = 0;   inline void Ot() { fwrite(__sr, 1, __C + 1, stdout), __C = -1; }   inline void print(register int x) {     if (__C > 1 << 20) Ot();     if (x < 0) __sr[++__C] =  - , x = -x;     while (__z[++__zz] = x % 10 + 48, x /= 10)       ;     while (__sr[++__C] = __z[__zz], --__zz)       ;     __sr[++__C] =   n ;   }   void file() {}   inline void chktime() {}   long long ksm(long long x, int y) {     long long ret = 1;     for (; y; y >>= 1, x = x * x)       if (y & 1) ret = ret * x;     return ret;   }   }  // namespace my_std   using namespace my_std;   int n;   int ans[10][333][10] = {       {{2}, {3, 1, 2, 3}, {3, 1, 2, 3}},       {{4}, {3, 1, 2, 3}, {3, 1, 2, 4}, {3, 1, 3, 4}, {3, 2, 3, 4}},       {{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}},       {{9},        {4, 1, 5, 2, 4},        {4, 1, 6, 3, 4},        {4, 2, 6, 3, 5},        {3, 1, 2, 6},        {3, 2, 3, 4},        {3, 1, 5, 3},        {3, 1, 2, 3},        {3, 4, 5, 6},        {3, 4, 5, 6}}};   int L[333][2], R[333][2];   int Ans[333 * 333][10], cnt;   void addcir(int s, int l) {     for (int i = (1); i <= (ans[s][0][0]); i++) {       assert(ans[s][i][0]);       ++cnt;       for (int j = (0); j <= (ans[s][i][0]); j++)         Ans[cnt][j] = ans[s][i][j] + (!!j) * l;     }   }   void solve(int l, int r) {     int s = r - l + 1;     if (s <= 6) return addcir(s - 3, l);     int x, y, c;     if (s & 1) {       x = 3, y = (s - 3) >> 1, c = 1;       ++l;       L[1][0] = l, L[1][1] = l + 1;       L[2][0] = l, L[2][1] = l + 2;       L[3][0] = l + 1, L[3][1] = l + 2;       for (int i = (1); i <= (y); i++)         for (int k = (0); k <= (1); k++) R[i][k] = l + 3 + 2 * (i - 1) + k;       --l;       addcir(0, l);     } else {       x = 2, y = (s - 4) >> 1, c = 2;       ++l;       for (int i = (1); i <= (x); i++)         for (int k = (0); k <= (1); k++) L[i][k] = l + 2 * (i - 1) + k;       for (int i = (1); i <= (y); i++)         for (int k = (0); k <= (1); k++) R[i][k] = l + 4 + 2 * (i - 1) + k;       --l;       addcir(1, l);     }     for (int i = (1); i <= (x); i++)       for (int j = (1); j <= (y); j++)         for (int k = (1); k <= (c); k++)           ++cnt, Ans[cnt][0] = 4, Ans[cnt][1] = L[i][0], Ans[cnt][2] = R[j][0],                  Ans[cnt][3] = L[i][1], Ans[cnt][4] = R[j][1];     solve(l + ((s & 1) ? 3 : 4), r);   }   int main() {     file();     read(n);     solve(0, n - 1);     printf( %d n , cnt);     for (int i = (1); i <= (cnt); i++) {       for (int j = (0); j <= (Ans[i][0]); j++) printf( %d  , Ans[i][j]);       puts(  );     }     return 0;   }