#include <bits/stdc++.h>
using namespace std;
void dfs(vector<vector<int>> &g, int c, vector<bool> &v, vector<int> &p) {
  v[c] = true;
  p.push_back(c);
  for (int o : g[c]) {
    if (!v[o]) {
      dfs(g, o, v, p);
      p.push_back(c);
    }
  }
}
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  ;
  int n, m, k;
  cin >> n >> m >> k;
  vector<vector<int>> graph(n + 1);
  for (int i = 0; i < m; i++) {
    int xi, yi;
    cin >> xi >> yi;
    graph[xi].push_back(yi);
    graph[yi].push_back(xi);
  }
  vector<bool> visited(n + 1, false);
  vector<int> path;
  dfs(graph, 1, visited, path);
  int maxv = (2 * n + k - 1) / k;
  int current = 0;
  for (int i = 0; i < k; i++) {
    int size = min(maxv, (int)path.size() - current);
    if (size == 0) {
      size = 1;
      current--;
    }
    cout << size << " ";
    for (int j = 0; j < size; j++) {
      cout << path[current++] << " ";
    }
    cout << "\n";
  }
  return 0;
}
