#include <bits/stdc++.h>
using namespace std;
queue<int> euler;
const int maxn = 200009;
vector<int> g[maxn];
int vis[maxn];
void dfs(int v, int p) {
  vis[v] = 1;
  euler.push(v);
  for (int u : g[v]) {
    if (u == p || vis[u]) continue;
    dfs(u, v);
  }
  if (p != -1) euler.push(p);
}
int main() {
  int n, m, k;
  cin >> n >> m >> k;
  while (m--) {
    int u, v;
    cin >> u >> v;
    u--, v--;
    g[u].push_back(v);
    g[v].push_back(u);
  }
  dfs(0, -1);
  int r = k;
  vector<int> aux;
  while (euler.size()) {
    aux.push_back(euler.front());
    euler.pop();
    if ((int)aux.size() == (2 * n + k - 1) / k || euler.empty()) {
      r--;
      cout << aux.size();
      for (int v : aux) cout << ' ' << v + 1;
      cout << "\n";
      aux.clear();
    }
  }
  while (r--) cout << "1 1\n";
}
