#include <bits/stdc++.h>
using namespace std;
const int N = 2e5 + 10;
const long long INF = 2e9 + 1;
const int MOD = 1e9 + 7;
const long double EPS = 1e-9;
vector<int> g[N];
vector<int> ans[N];
vector<int> eul;
bool used[N];
void dfs(int v) {
  eul.push_back(v);
  used[v] = true;
  for (auto nxt : g[v])
    if (!used[nxt]) {
      dfs(nxt);
      eul.push_back(v);
    }
}
int main() {
  ios_base::sync_with_stdio(false);
  int n, m, k;
  cin >> n >> m >> k;
  for (int i = 0; i < m; ++i) {
    int v, u;
    cin >> v >> u;
    g[--v].push_back(--u);
    g[u].push_back(v);
  }
  dfs(0);
  int len = (2 * n + k - 1) / k;
  for (int i = 0; i < k; i++) {
    for (int j = i * len; j < (i + 1) * len && j < (int)eul.size(); j++)
      ans[i].push_back(eul[j] + 1);
    if (ans[i].size() == 0) ans[i].push_back(1);
  }
  for (int i = 0; i < k; ++i) {
    cout << ans[i].size() << " ";
    for (auto t : ans[i]) cout << t << " ";
    cout << endl;
  }
}
