#include <bits/stdc++.h>
using namespace std;
const int N = 2e5 + 10;
int n, m, k;
vector<int> g[N], vec;
bool vis[N];
void dfs(int u) {
  vec.push_back(u);
  vis[u] = 1;
  for (int i = 0; i < g[u].size(); i++) {
    int v = g[u][i];
    if (vis[v]) continue;
    dfs(v);
    vec.push_back(u);
  }
  return;
}
int main() {
  scanf("%d%d%d", &n, &m, &k);
  for (int i = 1, x, y; i <= m; i++)
    scanf("%d%d", &x, &y), g[x].push_back(y), g[y].push_back(x);
  dfs(1);
  int len = (int)ceil(2.0 * n / k), cnt = 0;
  for (int i = 0; i < vec.size(); i += len) {
    cnt++;
    int qwq = min((int)vec.size(), i + len) - i;
    printf("%d ", qwq);
    for (int j = i; j < vec.size() && j < i + len; j++) printf("%d ", vec[j]);
    puts("");
  }
  for (int i = cnt + 1; i <= k; i++) puts("1 1");
  return 0;
}
