#include <bits/stdc++.h>
#pragma GCC optimize("Ofast", "unroll-loops", "omit-frame-pointer", "inline")
#pragma GCC option("arch=native", "tune=native", "no-zero-upper")
#pragma GCC target("avx2")
using namespace std;
const int INF = 0x3f3f3f3f;
const int N = 2e5 + 10;
int h[N], e[N * 2], ne[N * 2], idx;
queue<int> ans;
int q[N];
int n, m, k;
void add(int x, int y) { ne[idx] = h[x], e[idx] = y, h[x] = idx++; }
int find(int x) {
  if (q[x] != x) return q[x] = find(q[x]);
  return q[x];
}
void dfs(int u, int fa) {
  ans.push(u);
  for (int i = h[u]; ~i; i = ne[i]) {
    int j = e[i];
    if (j == fa) continue;
    dfs(j, u);
    ans.push(u);
  }
}
int main() {
  memset(h, -1, sizeof h);
  scanf("%d%d%d", &n, &m, &k);
  for (int i = 1; i <= n; i++) q[i] = i;
  for (int i = 1; i <= n; i++) q[i] = i;
  while (m--) {
    int x, y;
    scanf("%d%d", &x, &y);
    int fx = find(x), fy = find(y);
    if (fx == fy) continue;
    q[fx] = fy;
    add(x, y), add(y, x);
  }
  dfs(1, 0);
  int ppp = (2 * n + k - 1) / k;
  for (int i = 0; i < k; i++) {
    if (!ans.size()) ans.push(1);
    int res = min(ppp, (int)ans.size());
    printf("%d ", res);
    while (res--) {
      int t = ans.front();
      ans.pop();
      printf("%d ", t);
    }
    puts("");
  }
  return 0;
}
