#include <bits/stdc++.h>
using namespace std;
const int MAXN = 2e5 + 10;
vector<int> vt[MAXN];
map<pair<int, int>, int> mp;
int vis[MAXN], path[MAXN << 2];
int indx = 0;
void dfs(int x) {
  vis[x] = 1;
  path[++indx] = x;
  for (int i = 0; i < vt[x].size(); i++) {
    if (!vis[vt[x][i]]) {
      dfs(vt[x][i]);
      path[++indx] = x;
    }
  }
}
int main(void) {
  int n, m, k, x, y;
  scanf("%d%d%d", &n, &m, &k);
  for (int i = 0; i < m; i++) {
    scanf("%d%d", &x, &y);
    vt[x].push_back(y);
    vt[y].push_back(x);
  }
  dfs(1);
  int cnt = (2 * n + k - 1) / k;
  for (int i = 0; i < k; i++) {
    int cc = min(cnt, indx);
    if (!cc) {
      printf("1 1\n");
      continue;
    }
    printf("%d ", cc);
    for (int j = 0; j < cc && indx; j++, indx--) {
      printf("%d ", path[indx]);
    }
    puts("");
  }
  return 0;
}
