#include <bits/stdc++.h>
using namespace std;
int n, m, k;
vector<vector<int> > v;
vector<int> path;
bitset<200009> vis;
void dfs(int w) {
  vis[w] = 1;
  path.push_back(w);
  for (int i = 0; i < v[w].size(); i++) {
    if (!vis[v[w][i]]) {
      dfs(v[w][i]);
      path.push_back(w);
    }
  }
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  cin >> n >> m >> k;
  v.resize(n + 1);
  vis = 0;
  int a, b;
  for (int i = 0; i < m; i++) {
    cin >> a >> b;
    v[a].push_back(b);
    v[b].push_back(a);
  }
  dfs(1);
  double cD = ceil(2 * double(n) / k);
  int c = cD, k2 = 0;
  for (int i = 0; i < path.size(); i++) {
    if (i % c == 0) {
      if (i != 0) cout << endl;
      k2++;
      if (k2 > k) break;
      if (i + c <= path.size())
        cout << c << " ";
      else
        cout << path.size() - i << " ";
    }
    cout << path[i] << " ";
  }
  for (int i = 0; i < k - k2; i++) cout << "1 1" << endl;
  return 0;
}
