#include <bits/stdc++.h>
using namespace std;
const int maxN = 2e5 + 100;
vector<int> e[maxN];
bool used[maxN];
vector<int> path;
void dfs(int v) {
  used[v] = true;
  path.push_back(v);
  for (int i = 0; i < e[v].size(); i++) {
    int u = e[v][i];
    if (!used[u]) {
      dfs(u);
      path.push_back(v);
    }
  }
}
int main() {
  int n, m, k;
  scanf("%d%d%d", &n, &m, &k);
  for (int i = 0; i < m; i++) {
    int x, y;
    scanf("%d%d", &x, &y);
    x--, y--;
    e[x].push_back(y);
    e[y].push_back(x);
  }
  dfs(0);
  vector<vector<int> > ans;
  int cnt = (2 * n + k - 1) / k;
  ans.push_back(vector<int>());
  int cl = 0;
  for (int i = 0; i < path.size(); i++) {
    ans.back().push_back(path[i]);
    cnt--;
    if (cnt == 0) {
      cnt = (2 * n + k - 1) / k;
      ans.push_back(vector<int>());
    }
  }
  if (ans.back().empty()) ans.pop_back();
  while (ans.size() < k) {
    ans.push_back(vector<int>());
    ans.back().push_back(0);
  }
  for (int i = 0; i < k; i++) {
    printf("%d ", (int)ans[i].size());
    for (int j = 0; j < ans[i].size(); j++) {
      printf("%d ", ans[i][j] + 1);
    }
    printf("\n");
  }
  return 0;
}
