#include <bits/stdc++.h>
using namespace std;
int n, m, k, a, b;
vector<int> adj[2 * 100005];
vector<int> path, curr;
bool vis[2 * 100005];
void dfs(int u) {
  vis[u] = 1;
  path.push_back(u);
  for (int i = 0; i < adj[u].size(); i++) {
    if (!vis[adj[u][i]]) {
      dfs(adj[u][i]);
      path.push_back(u);
    }
  }
}
int main() {
  cin >> n >> m >> k;
  for (int i = 0; i < m; i++) {
    cin >> a >> b;
    adj[a].push_back(b);
    adj[b].push_back(a);
  }
  dfs(1);
  int lim = (2 * n + k - 1) / k;
  int cnt = 0;
  for (int i = 0; i < path.size(); i++) {
    curr.push_back(path[i]);
    if (curr.size() == lim) {
      cout << lim << " ";
      for (int j = 0; j < curr.size(); j++) cout << curr[j] << " ";
      cout << "\n";
      cnt++;
      curr.clear();
    }
  }
  if (curr.size() > 0) {
    cout << curr.size() << " ";
    for (int j = 0; j < curr.size(); j++) cout << curr[j] << " ";
    cout << "\n";
    cnt++;
  }
  for (int i = 0; i < k - cnt; i++) cout << "1 1\n";
  return 0;
}
