#include <bits/stdc++.h>
using namespace std;
void dfs(vector<vector<int> > &graf, vector<bool> &used, vector<int> &way,
         int u) {
  int w;
  way.push_back(u + 1);
  used[u] = true;
  for (int i = 0; i < graf[u].size(); i++) {
    w = graf[u][i];
    if (!used[w]) {
      dfs(graf, used, way, w);
      way.push_back(u + 1);
    }
  }
}
int main() {
  int n, m, k, x, y, id, allowed, len, now;
  scanf("%d %d %d\n", &n, &m, &k);
  vector<vector<int> > graf(n, vector<int>());
  for (int i = 0; i < m; i++) {
    scanf("%d %d", &x, &y);
    x--, y--;
    graf[x].push_back(y);
    graf[y].push_back(x);
  }
  vector<bool> used(n, false);
  vector<int> way;
  dfs(graf, used, way, 0);
  len = way.size() - 1;
  allowed = (2 * n - 1) / k + 1;
  id = 0;
  for (int i = 0; i < k; i++) {
    if (id >= len) {
      printf("1 1\n");
    } else {
      now = min(allowed, len - id);
      printf("%d ", now);
      for (int j = 0; j < now; j++, id++) {
        printf("%d ", way[id]);
      }
      printf("\n");
    }
  }
  return 0;
}
