#include <bits/stdc++.h>
using namespace std;
vector<bool> visited;
vector<vector<int>> arr;
vector<int> res;
void dfs(int i) {
  if (visited[i])
    return;
  else {
    visited[i].flip();
    bool found = false;
    for (auto x : arr[i]) {
      if (!visited[x]) {
        found = true;
        res.push_back(i);
        dfs(x);
      }
    }
    res.push_back(i);
  }
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  int n, m, k;
  cin >> n >> m >> k;
  arr.resize(n + 1);
  set<pair<int, int>> vers;
  while (m--) {
    int a, b;
    cin >> a >> b;
    if (a == b) continue;
    if (vers.find(make_pair(a, b)) == vers.end()) {
      vers.insert(make_pair(a, b));
      vers.insert(make_pair(b, a));
      arr[a].push_back(b);
      arr[b].push_back(a);
    }
  }
  visited.resize(n + 1, false);
  dfs(1);
  int l = ceil(2 * (float)n / k);
  assert(res.size() <= 2 * n);
  int curr = 0;
  int i;
  int num = 0;
  for (i = l; i < res.size(); i += l) {
    cout << l << " ";
    num++;
    for (int j = i - l; j < i && j >= 0; j++) {
      cout << res[curr] << " ";
      curr++;
    }
    cout << "\n";
  }
  while (num < k) {
    if (curr < res.size() - 1) {
      cout << res.size() - curr << " ";
      while (curr < res.size()) {
        cout << res[curr] << " ";
        curr++;
      }
      num++;
      cout << "\n";
    } else {
      num++;
      cout << 1 << " " << res[res.size() - 1] << "\n";
    }
  }
}
