#include <bits/stdc++.h>
#pragma GCC optimize("O3")
using namespace std;
const long long INF = 1e9 + 7;
const long long M = 998244353;
const long long N = 1e3 + 7;
vector<vector<long long>> gr;
vector<long long> vec;
vector<bool> used;
void dfs(long long now) {
  used[now] = true;
  vec.push_back(now);
  for (auto c : gr[now]) {
    if (!used[c]) {
      dfs(c);
      vec.push_back(now);
    }
  }
}
signed main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  cout.precision(37);
  cout << fixed;
  long long n, m, k;
  cin >> n >> m >> k;
  gr.resize(n);
  for (long long i = 0; i < m; ++i) {
    long long a, b;
    cin >> a >> b;
    a--;
    b--;
    gr[a].push_back(b);
    gr[b].push_back(a);
  }
  used.resize(n, false);
  dfs(0);
  long long cnt = (2 * n + k - 1) / k;
  vector<vector<long long>> ans(k);
  long long qwe = 0;
  for (long long i = 0; i < vec.size();) {
    for (long long q = 0; q < cnt and i < vec.size(); ++q) {
      ans[qwe].push_back(vec[i]);
      ++i;
    }
    qwe++;
  }
  for (long long i = 0; i < k; ++i) {
    if (ans[i].empty()) {
      cout << "1 1\n";
    } else {
      cout << ans[i].size() << " ";
      for (auto c : ans[i]) cout << c + 1 << " ";
      cout << "\n";
    }
  }
}
