#include <bits/stdc++.h>
using namespace std;
const int MAXN = 2e5;
vector<int> gr[MAXN];
int n, m, k;
vector<int> st;
bool used[MAXN];
void dfs(int v) {
  used[v] = 1;
  st.push_back(v);
  for (int u : gr[v]) {
    if (!used[u]) {
      dfs(u);
      st.push_back(v);
    }
  }
}
int main() {
  scanf("%d%d%d", &n, &m, &k);
  int len = 2 * n / k + (2 * n % k ? 1 : 0);
  for (int i = 0; i < m; ++i) {
    int p, q;
    scanf("%d%d", &p, &q);
    --p;
    --q;
    gr[p].push_back(q);
    gr[q].push_back(p);
  }
  dfs(0);
  int pos = 0;
  m = st.size();
  for (int i = 0; i < k; ++i) {
    vector<int> ans;
    while (pos < m && ans.size() < len) {
      ans.push_back(st[pos++]);
    }
    if (ans.size() == 0) {
      ans.push_back(0);
    }
    printf("%d ", (int)ans.size());
    for (int j : ans) {
      printf("%d ", j + 1);
    }
    printf("\n");
  }
  assert(pos == m);
}
