#include <bits/stdc++.h>
using namespace std;
const int INF = 1e9 + 228;
const int MAXN = 2e6 + 228;
vector<int> g[MAXN];
bool used[MAXN];
int p[MAXN];
int n, m, k;
vector<int> et;
void dfs(int v) {
  used[v] = 1;
  et.push_back(v);
  for (auto to : g[v]) {
    if (used[to]) continue;
    dfs(to);
    et.push_back(v);
  }
}
int get(int t) {
  if (t == p[t]) return t;
  return p[t] = get(p[t]);
}
void add(int a, int b) {
  a = get(a);
  b = get(b);
  p[a] = b;
}
signed main() {
  cin.tie(0);
  cin.sync_with_stdio(0);
  cout.tie(0);
  ;
  cin >> n >> m >> k;
  for (int i = 0; i < MAXN; i++) {
    p[i] = i;
  }
  for (int i = 0; i < m; i++) {
    int aa, bb;
    cin >> aa >> bb;
    aa--;
    bb--;
    if (get(aa) == get(bb)) {
      continue;
    }
    add(aa, bb);
    g[aa].push_back(bb);
    g[bb].push_back(aa);
  }
  dfs(0);
  int sz = et.size();
  int trg = (2 * n + k - 1) / k;
  int iter = 0;
  for (int i = 0; i < k; i++) {
    cout << max(1, min(sz - iter, trg));
    if (iter == sz) {
      cout << " 1" << endl;
      continue;
    }
    for (int j = iter; j < min(sz - iter, trg) + iter; j++) {
      cout << ' ' << et[j] + 1;
    }
    cout << endl;
    iter += min(sz - iter, trg);
  }
  return 0;
}
