#include <bits/stdc++.h>
using namespace std;
inline int read() {
  char c = getchar();
  int x = 0;
  bool f = 0;
  for (; !isdigit(c); c = getchar()) f ^= !(c ^ 45);
  for (; isdigit(c); c = getchar()) x = (x << 1) + (x << 3) + (c ^ 48);
  if (f) x = -x;
  return x;
}
int n, m, k, s;
vector<int> e[200005];
vector<int> dfn, res[200005];
bool vis[200005];
void dfs(int u) {
  vis[u] = 1;
  dfn.push_back(u);
  for (auto v : e[u])
    if (!vis[v]) dfs(v), dfn.push_back(u);
}
signed main() {
  n = read(), m = read(), k = read(), s = ceil(2.0 * n / k);
  for (register int i = (1); i <= (m); ++i) {
    int u = read(), v = read();
    e[u].push_back(v), e[v].push_back(u);
  }
  dfs(1);
  for (register int i = (0); i <= ((int)dfn.size() - 1); ++i)
    res[i / s + 1].push_back(dfn[i]);
  for (register int i = (1); i <= (k); ++i) {
    if (!res[i].size()) res[i].push_back(1);
    cout << res[i].size() << ' ';
    for (auto x : res[i]) cout << x << ' ';
    puts("");
  }
  return 0;
}
