#include <bits/stdc++.h>
#pragma GCC optimize("Ofast")
#pragma GCC target("sse,sse2,sse3,ssse3,sse4,abm,mmx,avx,avx2")
#pragma GCC optimize("unroll-loops")
using namespace std;
const unsigned mod = 998244353;
const unsigned _mod = 1e9 + 7;
const long long infi = 0x3f3f3f3f3f3f3fll;
const int inf = 0x3f3f3f3f;
long long read() {
  long long x = 0, f = 1;
  char ch = getchar();
  while (ch > '9' || ch < '0') {
    if (ch == '-') f = -1;
    ch = getchar();
  }
  while (ch >= '0' && ch <= '9') {
    x = x * 10 + ch - '0';
    ch = getchar();
  }
  return x * f;
}
long long ksm(long long x, long long y = mod - 2, long long m = mod) {
  long long ret = 1;
  while (y) {
    if (y & 1) ret = ret * x % m;
    y >>= 1ll;
    x = x * x % m;
  }
  return ret;
}
long long qpow(long long x, long long y) {
  long long ret = 1;
  while (y) {
    if (y & 1ll) ret = ret * x;
    y >>= 1ll;
    x = x * x;
  }
  return ret;
}
int n, m, k, a, b, vis[200010], p, jyzyyds, x, y;
vector<int> vec[200010], jyztxdy;
void dfs(int x) {
  vis[x] = 1;
  jyztxdy.push_back(x);
  for (int u : vec[x])
    if (!vis[u]) dfs(u), jyztxdy.push_back(x);
}
int main() {
  cin >> n >> m >> k;
  for (int i = (1); i <= (m); ++i)
    x = read(), y = read(), vec[x].push_back(y), vec[y].push_back(x);
  dfs(1);
  jyzyyds = jyztxdy.size() - 1;
  p = (2 * n - 1) / k;
  for (int i = (1); i <= (k); ++i) {
    a = (jyzyyds < (i - 1) * (p + 1) ? jyzyyds : (i - 1) * (p + 1)),
    b = (jyzyyds < a + p ? jyzyyds : a + p);
    cout << b - a + 1 << ' ';
    for (int j = (a); j <= (b); ++j) cout << jyztxdy[j] << ' ';
    puts("");
  }
  return 0;
}
