#include <bits/stdc++.h>
using namespace std;
const string FILENAME = "input";
const int MAXN = 2e5 + 1;
int n, m, k, c;
bool used[MAXN];
vector<int> edge[MAXN];
set<int> cnt[MAXN];
int d[MAXN], p[MAXN];
set<pair<int, int>> need;
vector<int> ans[MAXN];
bool res[MAXN];
int L = 0;
void add(int i) {
  if (ans[L].size() == c) ++L;
  ans[L].push_back(i);
}
void dfs(int i) {
  res[i] = true;
  if (ans[L].size() == c) {
    ++L;
  }
  add(i);
  for (int j : edge[i]) {
    if (res[j]) continue;
    dfs(j);
    add(i);
  }
}
int main() {
  ios::sync_with_stdio(0);
  cin >> n >> m >> k;
  c = (2 * n + k - 1) / k;
  for (int i = m; i--;) {
    int a, b;
    cin >> a >> b;
    --a, --b;
    edge[a].push_back(b);
    edge[b].push_back(a);
  }
  dfs(0);
  for (int i = 0; i < k; ++i) {
    if (ans[i].size() == 0) ans[i].push_back(0);
    cout << ans[i].size() << ' ';
    for (int j : ans[i]) {
      cout << j + 1 << ' ';
    }
    cout << '\n';
  }
}
