#include <bits/stdc++.h>
using namespace std;
const int MAX_N = 200000;
const int MAX_L = MAX_N * 2;
vector<int> nbrs[MAX_N];
int ps[MAX_N], cis[MAX_N], vs[MAX_L];
bool used[MAX_N];
int main() {
  int n, m, k;
  scanf("%d%d%d", &n, &m, &k);
  for (int i = 0; i < m; i++) {
    int u, v;
    scanf("%d%d", &u, &v);
    u--, v--;
    nbrs[u].push_back(v);
    nbrs[v].push_back(u);
  }
  ps[0] = -1;
  int l = 0;
  for (int u = 0; u >= 0;) {
    vector<int> &nbru = nbrs[u];
    if (cis[u] == 0) {
      vs[l++] = u;
      used[u] = true;
    }
    while (cis[u] < nbru.size() && used[nbru[cis[u]]]) cis[u]++;
    if (cis[u] < nbru.size()) {
      int v = nbru[cis[u]++];
      ps[v] = u;
      u = v;
    } else {
      int v = ps[u];
      if (v >= 0) vs[l++] = v;
      u = v;
    }
  }
  int q = l / k, r = l % k;
  for (int i = 0, j = 0; i < k; i++) {
    int ci = q + ((i < r) ? 1 : 0);
    printf("%d", ci);
    while (ci--) printf(" %d", vs[j++] + 1);
    putchar('\n');
  }
  return 0;
}
