#include <bits/stdc++.h>
using namespace std;
vector<long long> gr[200100];
bool visited[200100];
vector<long long> euler;
long long temp[200100];
void dfs(long long v) {
  euler.push_back(v);
  visited[v] = true;
  for (long long u : gr[v]) {
    if (!visited[u]) {
      dfs(u);
      euler.push_back(v);
    }
  }
}
int main() {
  ios_base::sync_with_stdio(0);
  long long n, m, k;
  cin >> n >> m >> k;
  for (long long i = 0; i < m; i++) {
    long long u, v;
    cin >> u >> v;
    u--, v--;
    gr[u].push_back(v);
    gr[v].push_back(u);
  }
  dfs(0);
  long long esz = euler.size();
  vector<long long> sz;
  for (long long i = 0; i < k; i++) sz.push_back((2 * n - 1) / k);
  for (long long i = 0; i < 2 * n - 1 - k * ((2 * n - 1) / k); i++) sz[i]++;
  long long curr = 0;
  for (long long i = 0; i < k; i++) {
    cout << sz[i] << " ";
    for (long long j = 0; j < sz[i]; j++, curr++)
      cout << euler[curr] + 1 << " ";
    cout << "\n";
  }
  return 0;
}
