#include <bits/stdc++.h>
using namespace std;
const int INF = 1e9;
const long long LINF = 1e18;
vector<vector<int>> gr;
vector<int> order;
vector<bool> used;
void dfs(int x) {
  order.push_back(x);
  used[x] = 1;
  for (auto i : gr[x]) {
    if (!used[i]) {
      dfs(i);
      order.push_back(x);
    }
  }
}
int main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  int n, m, k;
  cin >> n >> m >> k;
  used.resize(n + 1);
  gr.resize(n + 1);
  for (int i = 0; i < m; i++) {
    int a, b;
    cin >> a >> b;
    gr[a].push_back(b);
    gr[b].push_back(a);
  }
  dfs(1);
  int mxn = ceil(2. * n / k);
  int c = k;
  for (int i = 0; i < order.size(); i++) {
    if (i % mxn == 0 && i != 0) cout << "\n";
    if (i % mxn == 0) {
      cout << min(mxn, (int)order.size() - i) << " ";
      c--;
    }
    cout << order[i] << " ";
  }
  while (c--) {
    cout << 1 << " " << 1 << "\n";
  }
  return 0;
}
