#include <bits/stdc++.h>
inline int read() {
  register int x;
  register char c;
  while (!isdigit(c = getchar()))
    ;
  x = c ^ 48;
  while (isdigit(c = getchar())) x = (x << 1) + (x << 3) + (c ^ 48);
  return x;
}
int n, m, k;
struct Graph {
  int edge_size, head[200010];
  int node[200010 << 1], next[200010 << 1];
  inline void add_edge(int u, int v) {
    node[++edge_size] = v;
    next[edge_size] = head[u];
    head[u] = edge_size;
  }
} G;
bool vis[200010];
int cnt, a[200010 << 1];
void dfs(int u) {
  vis[u] = true;
  a[++cnt] = u;
  for (int e = G.head[u]; e; e = G.next[e]) {
    int v = G.node[e];
    if (!vis[v]) dfs(v), a[++cnt] = u;
  }
}
int main() {
  n = read(), m = read(), k = read();
  for (int i = 1; i <= m; ++i) {
    int u = read(), v = read();
    G.add_edge(u, v), G.add_edge(v, u);
  }
  dfs(1);
  int l = 2 * n / k + (bool)((2 * n) % k);
  for (int i = 1, j = 0; i <= k; ++i) {
    if (j == cnt) {
      puts("1 1");
      continue;
    }
    printf("%d ", std::min(l, cnt - j));
    for (int p = 1; p <= l && j < cnt; ++p) printf("%d ", a[++j]);
    puts("");
  }
  return 0;
}
