#include <bits/stdc++.h>
using namespace std;
vector<int> adj[200005], ans;
int vis[200005];
void dfs(int st) {
  vis[st] = 1;
  int fl = 0;
  ans.push_back(st + 1);
  for (int x : adj[st]) {
    if (!vis[x]) {
      fl = 1;
      dfs(x);
      ans.push_back(st + 1);
    }
  }
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  memset(vis, 0, sizeof(vis));
  int n, m, k;
  cin >> n >> m >> k;
  for (int i = 0; i < m; i++) {
    int x, y;
    cin >> x >> y;
    adj[x - 1].push_back(y - 1);
    adj[y - 1].push_back(x - 1);
  }
  dfs(0);
  int p = 0;
  int len = (2 * n) / k + (((2 * n) % k == 0) ? 0 : 1);
  for (int i = 0; i < k; i++) {
    if (p >= ans.size()) {
      cout << "1 1\n";
      continue;
    }
    vector<int> cur;
    for (int j = p; j < min((int)ans.size(), p + len); j++) {
      cur.push_back(ans[j]);
    }
    p += len;
    cout << cur.size() << " ";
    for (int x : cur) cout << x << " ";
    cout << "\n";
  }
  return 0;
}
