#include <bits/stdc++.h>
using namespace std;
int n, m, k, vis[200200], cnt = 0, nw = 1, p;
vector<int> e[200200];
void dfs(int x) {
  vis[x] = 1;
  printf("%d ", x);
  cnt++;
  if (cnt == p) {
    if (2 * n - 1 - nw * p == 0)
      printf("\n1 1");
    else if (2 * n - 1 - nw * p < p)
      printf("\n%d ", 2 * n - 1 - nw * p);
    else
      printf("\n%d ", p);
    nw++;
    cnt = 0;
  }
  for (int i = 0; i < e[x].size(); i++) {
    if (vis[e[x][i]]) continue;
    dfs(e[x][i]);
    printf("%d ", x);
    cnt++;
    if (cnt == p) {
      if (2 * n - 1 - nw * p == 0)
        printf("\n1 1");
      else if (2 * n - 1 - nw * p < p)
        printf("\n%d ", 2 * n - 1 - nw * p);
      else
        printf("\n%d ", p);
      nw++;
      cnt = 0;
    }
  }
}
int main() {
  scanf("%d%d%d", &n, &m, &k);
  p = (n * 2 - 1) / k + 1;
  int u, v;
  for (int i = 1; i <= m; i++) {
    scanf("%d%d", &u, &v);
    e[u].push_back(v);
    e[v].push_back(u);
  }
  memset(vis, 0, sizeof vis);
  if (nw == k)
    printf("%d ", 2 * n - 1 - (k - 1) * p);
  else
    printf("%d ", p);
  dfs(1);
  printf("\n");
  while (nw < k) {
    printf("1 1\n");
    nw++;
  }
  return 0;
}
