#include <bits/stdc++.h>
using namespace std;
const int MAX_N = 2e5;
vector<int> graph[MAX_N];
vector<int> way;
bool used[MAX_N];
void dfs(int u) {
  used[u] = true;
  way.push_back(u + 1);
  for (int i : graph[u]) {
    if (used[i]) continue;
    dfs(i);
    way.push_back(u + 1);
  }
}
int main() {
  ios::sync_with_stdio(false);
  cin.tie(NULL);
  int n, m, k;
  cin >> n >> m >> k;
  for (int i = 0; i < m; i++) {
    int x, y;
    cin >> x >> y;
    --x;
    --y;
    graph[x].push_back(y);
    graph[y].push_back(x);
  }
  memset(used, 0, n * sizeof(bool));
  dfs(0);
  int sz;
  if ((2 * n) % k == 0) {
    sz = 2 * n / k;
  } else {
    sz = 2 * n / k + 1;
  }
  int curr = 0;
  int cnt = 0;
  while (curr < way.size()) {
    ++cnt;
    if (way.size() - curr >= sz) {
      cout << sz << " ";
      for (int i = 0; i < sz; i++) {
        cout << way[curr++] << " ";
      }
      cout << "\n";
    } else {
      cout << way.size() - curr << " ";
      for (int i = curr; i < way.size(); i++) {
        cout << way[i] << " ";
      }
      curr = way.size();
      cout << "\n";
    }
  }
  while (cnt < k) {
    ++cnt;
    cout << "1 1\n";
  }
  return 0;
}
