#include <bits/stdc++.h>
using namespace std;
const int mod = 1e9 + 7;
vector<int> g[200100];
bool vis[200100];
int n, m, k, path[200100 * 2], cnt;
void dfs(int from) {
  vis[from] = 1;
  path[++cnt] = from;
  for (int i = 0; i < (int)g[from].size(); i++) {
    int to = g[from][i];
    if (!vis[to]) {
      dfs(to);
      path[++cnt] = from;
    }
  }
}
int main() {
  while (~scanf("%d%d%d", &n, &m, &k)) {
    cnt = 0;
    memset(vis, 0, sizeof(vis));
    for (int i = 1; i <= n; i++) g[i].clear();
    for (int i = 0; i < m; i++) {
      int u, v;
      scanf("%d%d", &u, &v);
      g[u].push_back(v);
      g[v].push_back(u);
    }
    dfs(1);
    int maxC = (2 * n + k - 1) / k;
    for (int i = 0; i < k; i++) {
      int c = min(maxC, cnt);
      if (c) {
        printf("%d", c);
        for (int j = 0; j < c && cnt; j++) printf(" %d", path[cnt--]);
        printf("\n");
      } else
        printf("1 1\n");
    }
  }
  return 0;
}
