#include <bits/stdc++.h>
using namespace std;
const int N = 2e5 + 10;
unordered_set<int> g[N];
int n, m, k;
vector<int> order;
bool used[N];
void dfs(int v) {
  used[v] = true;
  order.push_back(v);
  for (int u : g[v]) {
    if (!used[u]) {
      dfs(u);
      order.push_back(v);
    }
  }
}
int main() {
  ios::sync_with_stdio(false);
  cin >> n >> m >> k;
  order.reserve(2 * n);
  for (int i = 0; i < m; i++) {
    int a, b;
    cin >> a >> b;
    a--;
    b--;
    if (a != b) {
      g[a].insert(b);
      g[b].insert(a);
    }
  }
  dfs(0);
  vector<int> acc;
  int pt = 0;
  for (int i = 0; i < order.size(); i++) {
    acc.push_back(order[i]);
    if (acc.size() == (2 * n + k - 1) / k) {
      cout << acc.size() << " ";
      for (int j : acc) {
        cout << j + 1 << " ";
      }
      cout << "\n";
      acc.clear();
      acc.reserve((2 * n + k - 1) / k);
      pt++;
    }
  }
  if (!acc.empty()) {
    pt++;
    cout << acc.size() << " ";
    for (int j : acc) {
      cout << j + 1 << " ";
    }
    cout << "\n";
    acc.clear();
  }
  while (pt < k) {
    cout << "1 1\n";
    pt++;
  }
}
