#include <bits/stdc++.h>
using namespace std;
vector<int> g[200005];
int deg[200005];
int idx[200005];
bool vis[200005];
vector<int> path;
void dfs(int u) {
  path.push_back(u);
  vis[u] = 1;
  for (int i = 0; i < g[u].size(); i++) {
    int v = g[u][i];
    if (vis[v]) continue;
    dfs(v);
    path.push_back(u);
  }
}
int main() {
  ios_base::sync_with_stdio(false), cin.tie(NULL);
  int n, m, k;
  cin >> n >> m >> k;
  for (int i = 0; i < m; i++) {
    int a, b;
    cin >> a >> b;
    g[a].push_back(b);
    g[b].push_back(a);
  }
  if (n == 1) {
    printf("1 1\n");
    return 0;
  }
  int start = 1;
  for (int i = 1; i <= n; i++) {
    deg[i] = g[i].size();
    if (deg[i] == 1) start = i;
  }
  dfs(start);
  int mx = (2 * n + k - 1) / k;
  int cnt = 0;
  vector<int> ok;
  int x = 0;
  for (int i = 0; i < path.size(); i++) {
    ok.push_back(path[i]);
    cnt++;
    if (cnt == mx && x != k) {
      printf("%d ", cnt);
      for (int i = 0; i < cnt; i++) printf("%d ", ok[i]);
      printf("\n");
      cnt = 0;
      ok.clear();
      x++;
    }
  }
  if (cnt != 0 && x != k) {
    printf("%d ", cnt);
    for (int i = 0; i < cnt; i++) printf("%d ", ok[i]);
    printf("\n");
    cnt = 0;
    ok.clear();
    x++;
  }
  if (x != k) {
    for (int i = x; i < k; i++) {
      printf("1 1\n");
    }
  }
}
