#include <bits/stdc++.h>
using namespace std;
const int MaxN = 2e5, MaxM = 5e5;
int n, m, K, all;
int pre[MaxM + 5], last[MaxN + 5], other[MaxM + 5];
bool vis[MaxN + 5];
vector<int> ans;
void Build(int x, int y) {
  pre[++all] = last[x];
  last[x] = all;
  other[all] = y;
}
void Init() {
  all = -1;
  memset(last, -1, sizeof(last));
  for (int i = 1; i <= m; i++) {
    int u, v;
    scanf("%d%d", &u, &v);
    Build(u, v);
    Build(v, u);
  }
}
void Dfs(int x) {
  vis[x] = true;
  ans.push_back(x);
  int ed = last[x], dr;
  while (ed != -1) {
    dr = other[ed];
    if (!vis[dr]) {
      Dfs(dr);
      ans.push_back(x);
    }
    ed = pre[ed];
  }
}
void Solve() {
  ans.clear();
  memset(vis, 0, sizeof(vis));
  Dfs(1);
  int B = (int)ceil((int)ans.size() * 1.0 / K);
  for (int i = 1; i <= K; i++) {
    int t = min((int)ans.size(), i * B) - B * (i - 1);
    if (t > 0) {
      printf("%d", t);
      for (int j = B * (i - 1); j <= min((int)ans.size(), i * B) - 1; j++)
        printf(" %d", ans[j]);
    } else
      printf("1 1");
    printf("\n");
  }
}
int main() {
  while (~scanf("%d%d%d", &n, &m, &K)) {
    Init();
    Solve();
  }
  return 0;
}
