#include <bits/stdc++.h>
using namespace std;
const double eps = 1e-8;
const int mod = 10007;
const double PI = acos(-1.0);
int dx[4] = {0, 0, 1, -1};
int dy[4] = {1, -1, 0, 0};
int n, m, k;
vector<int> e[400005];
int visit[400005];
int cnt = 0;
int limit;
int ans[400005];
void dfs(int u) {
  visit[u] = 1;
  ans[cnt++] = u;
  for (int i = 0; i < e[u].size(); i++) {
    int v = e[u][i];
    if (visit[v]) continue;
    dfs(v);
    ans[cnt++] = u;
  }
}
int main() {
  scanf("%d%d%d", &n, &m, &k);
  for (int i = 0; i < m; i++) {
    int u, v;
    scanf("%d%d", &u, &v);
    e[u].push_back(v);
    e[v].push_back(u);
  }
  dfs(1);
  int limit = (2 * n + k - 1) / k;
  for (int i = 0; i < k; i++) {
    int l = min(limit * i, cnt - 1);
    int r = min(l + limit, cnt);
    printf("%d", r - l);
    for (int j = l; j < r; j++) printf(" %d", ans[j]);
    puts("");
  }
  return 0;
}
