#include <bits/stdc++.h>
using namespace std;
const int N = 200005, M = (N << 1);
int to[M], nxt[M], euler[M], fir[N], F[N], n, m, k, ecnt = 0, idx = 0;
template <class T>
void rd(T &x) {
  char c = getchar();
  int f = 1;
  x = 0;
  for (; !isdigit(c); c = getchar())
    if (c == '-') f = -1;
  for (; isdigit(c); c = getchar()) x = x * 10 + c - '0';
  x *= f;
}
int find(int u) { return F[u] = F[u] == u ? u : find(F[u]); }
void ae(int u, int v) {
  to[++ecnt] = v;
  nxt[ecnt] = fir[u];
  fir[u] = ecnt;
}
void dfs(int u, int f) {
  int i;
  euler[++idx] = u;
  for (i = fir[u]; i; i = nxt[i]) {
    int v = to[i];
    if (v != f) dfs(v, u), euler[++idx] = u;
  }
}
int main() {
  int i, j, lim, cur;
  rd(n);
  rd(m);
  rd(k);
  for (i = 1; i <= n; ++i) F[i] = i;
  for (i = 1; i <= m; ++i) {
    int u, v, fu, fv;
    rd(u);
    rd(v);
    fu = find(u);
    fv = find(v);
    if (fu != fv) F[fu] = fv, ae(u, v), ae(v, u);
  }
  dfs(1, 0);
  lim = min(2 * n / k + (2 * n % k != 0), idx), cur = 0;
  for (i = 1; i <= k; ++i) {
    int l, r;
    r = min(idx, lim + cur);
    l = r - lim + 1;
    printf("%d ", lim);
    cur = r;
    for (j = l; j <= r; ++j) printf("%d ", euler[j]);
    printf("\n");
  }
  return 0;
}
