#include <bits/stdc++.h>
const double eps = 1e-10;
using namespace std;
using ll = long long;
using ul = unsigned long long;
using PII = pair<int, int>;
const int NN = 1011101;
const int NZ = 511100;
const int MM = 151;
const int need = (1 << 30) - 1;
int n, m, s, x, i, j, t, a, b, k, c, r, col[NN];
int l;
ll in[NN];
int comp[NN];
PII gr[NN];
int main() {
  scanf("%d %d", &n, &m);
  for (int i = 0; i < m; i++) {
    scanf("%d %d", &a, &b);
    a--, b--;
    gr[i + i] = {a, b};
    gr[i + i + 1] = {b, a};
  }
  set<int> sv;
  for (int i = 0; i < n; i++) sv.insert(i);
  m += m;
  sort(gr, gr + m);
  vector<vector<int>> answww;
  while (!sv.empty()) {
    int ff = *sv.begin();
    sv.erase(ff);
    queue<int> qq;
    qq.push(ff);
    vector<int> _comp;
    while (!qq.empty()) {
      int v = qq.front();
      qq.pop();
      _comp.push_back(v);
      vector<int> rv;
      for (auto it : sv) {
        int vv = it;
        if (!binary_search(gr, gr + m, make_pair(v, it))) {
          qq.push(vv);
          rv.push_back(vv);
        }
      }
      for (int i = 0; i < rv.size(); i++) {
        sv.erase(rv[i]);
      }
    }
    answww.push_back(_comp);
  }
  printf("%d\n", answww.size());
  for (int i = 0; i < answww.size(); i++) {
    printf("%d ", answww[i].size());
    for (int j = 0; j < answww[i].size(); j++) {
      printf(" %d", answww[i][j] + 1);
    }
    puts("\n");
  }
  return 0;
}
