#include <bits/stdc++.h>
using namespace std;
int n, m, k, L;
vector<int> to[200005], dfn;
bool vis[200005];
void dfs(int p) {
  vis[p] = 1;
  dfn.push_back(p);
  for (int i = 0; i < to[p].size(); i++)
    if (!vis[to[p][i]]) {
      dfs(to[p][i]);
      dfn.push_back(p);
    }
}
int main() {
  scanf("%d%d%d", &n, &m, &k);
  L = ceil(2.0 * n / k);
  for (int i = 1, u, v; i <= m; i++) {
    scanf("%d%d", &u, &v);
    to[u].push_back(v);
    to[v].push_back(u);
  }
  dfs(1);
  memset(vis, 0, sizeof(vis));
  for (int i = 1, cur = -1; i <= k; i++) {
    int _cnt = 0;
    vector<int> res;
    while (cur + 1 < dfn.size() && vis[dfn[cur + 1]]) cur++;
    while (cur + 1 < dfn.size() && _cnt + 1 <= L) {
      _cnt++;
      cur++;
      vis[dfn[cur]] = 1;
      res.push_back(dfn[cur]);
    }
    if (_cnt == 0) {
      printf("1 1\n");
    } else {
      printf("%d", _cnt);
      for (int j = 0; j < res.size(); j++) printf(" %d", res[j]);
      printf("\n");
    }
  }
}
