#include <bits/stdc++.h>
using namespace std;
vector<int> vec[200000 + 10], t;
bool vst[200000 + 10];
bool dfs(int cur) {
  if (vst[cur]) return false;
  vst[cur] = true;
  t.push_back(cur);
  for (int nxt : vec[cur])
    if (dfs(nxt)) t.push_back(cur);
  return true;
}
int main() {
  int n, m, k;
  int u, v;
  scanf("%d %d %d", &n, &m, &k);
  while (m--) {
    scanf("%d %d", &u, &v);
    vec[u].push_back(v);
    vec[v].push_back(u);
  }
  dfs(1);
  m = t.size();
  int x = m / k;
  int y = m % k;
  int ix = 0;
  for (long long i = 1; i <= k; i++) {
    u = x + (y != 0);
    cout << u;
    for (long long j = 0; j < x; j++) cout << " " << t[ix++];
    if (y) {
      cout << " " << t[ix++];
      y--;
    }
    printf("\n");
  }
  return 0;
}
