#include <bits/stdc++.h>
using namespace std;
vector<int> ans;
void dfs(int source, vector<int> graph[], bool visited[]) {
  visited[source] = 1;
  ans.push_back(source);
  for (auto i : graph[source]) {
    if (visited[i] == 1) continue;
    dfs(i, graph, visited);
    ans.push_back(source);
  }
}
int main() {
  int n, m, k, x, y;
  cin >> n >> m >> k;
  vector<int> graph[n + 1];
  bool visited[n + 1];
  memset(visited, 0, sizeof(visited));
  set<int> s;
  for (int i = 0; i < m; i++) {
    cin >> x >> y;
    s.insert(x);
    s.insert(y);
    graph[y].push_back(x);
    graph[x].push_back(y);
  }
  dfs(1, graph, visited);
  int j = 0, tot = (n * 2 + k - 1) / k, fixed = (n * 2 + k - 1) / k;
  for (int i = 1; i <= k; i++) {
    tot = fixed * i;
    tot = min(tot, int(ans.size()));
    cout << tot - j << " ";
    while (j != tot) {
      cout << ans[j] << " ";
      j++;
    }
    cout << '\n';
    if (i != k && j == ans.size()) j -= fixed;
  }
}
