#include <bits/stdc++.h>
using namespace std;
const int N = 2e5 + 5;
vector<int> adj[N];
vector<int> vec;
int limit;
int visit[N];
int cur = 0;
void dfs(int u) {
  visit[u] = 1;
  vec.push_back(u);
  for (int i = 0; i < adj[u].size(); ++i) {
    int v = adj[u][i];
    if (visit[v]) continue;
    dfs(v);
    vec.push_back(u);
  }
}
vector<int> have[N];
int main() {
  int n, m, k;
  cin >> n >> m >> k;
  limit = (2 * n + k - 1) / k;
  for (int i = 0; i < m; ++i) {
    int u, v;
    scanf("%d%d", &u, &v);
    adj[u].push_back(v);
    adj[v].push_back(u);
  }
  dfs(1);
  int cur = 0;
  for (int i = 0; i < vec.size(); ++i) {
    have[cur].push_back(vec[i]);
    if ((int)have[cur].size() == limit) cur++;
  }
  for (int i = 0; i < k; ++i) {
    if (have[i].empty()) have[i].push_back(1);
    printf("%d", have[i].size());
    for (int j = 0; j < have[i].size(); ++j) printf(" %d", have[i][j]);
    puts("");
  }
  return 0;
}
