#include <bits/stdc++.h>
using namespace std;
int n, m, k;
vector<int> edg[200005];
vector<int> ord;
bool vis[200005];
void dfs(int i) {
  vis[i] = true;
  ord.push_back(i);
  int cnt = 0;
  for (int j = 0; j < edg[i].size(); j++) {
    if (!vis[edg[i][j]]) {
      dfs(edg[i][j]);
      cnt++;
      ord.push_back(i);
    }
  }
}
int main() {
  ios_base::sync_with_stdio(false);
  cin >> n >> m >> k;
  for (int i = 1; i <= m; i++) {
    int u, v;
    cin >> u >> v;
    edg[u].push_back(v);
    edg[v].push_back(u);
  }
  dfs(1);
  int MAX = (2 * n) / k;
  if (2 * n % k != 0) MAX += 1;
  int ind = 0;
  while (k != 0) {
    int cnt = 0, sta = ind, end = ind;
    while (ind < ord.size()) {
      end = ind;
      cnt++;
      ind++;
      if (cnt == MAX) break;
    }
    if (cnt == 0) {
      cout << 1 << " " << 1 << endl;
      k--;
      continue;
    }
    cout << end - sta + 1 << " ";
    for (int j = sta; j <= end; j++) cout << ord[j] << " ";
    cout << endl;
    k--;
  }
}
