#include <bits/stdc++.h>
using namespace std;
string itosm(long long x) {
  if (x == 0) return "0";
  string ans = "";
  while (x > 0) {
    ans += ((x % 10) + '0');
    x /= 10;
  }
  reverse(ans.begin(), ans.end());
  return ans;
}
long long stoim(string str) {
  long long ans = 0;
  long long k = 1;
  for (int i = str.length() - 1; i >= 0; i--) {
    ans += (str[i] - '0') * k;
    k *= 10;
  }
  return ans;
}
const long long infll = 1e18 + 3;
const int inf = 1009000999;
const double eps = 1e-6;
const int maxn = 1e6 + 7777;
const int baseint = 1000200013;
const long long basell = 1e18 + 3;
const long double PI = acos(-1.0);
const int mod = 1e9 + 7;
vector<int> g[maxn];
vector<int> f;
bool used[maxn];
void dfs(int v) {
  f.push_back(v);
  used[v] = 1;
  for (int to : g[v])
    if (!used[to]) {
      dfs(to);
      f.push_back(v);
    }
}
int main() {
  srand(228228);
  ios_base::sync_with_stdio(0);
  ;
  cin.tie(0);
  int n, m, k;
  cin >> n >> m >> k;
  for (int i = (0); i < (m); i++) {
    int v, u;
    cin >> v >> u;
    g[v].push_back(u);
    g[u].push_back(v);
  }
  dfs(1);
  int c = 0;
  for (int i = (0); i < (k); i++) {
    int ff = min((int)f.size(), c + ((2 * n + k - 1) / k));
    cout << ff - c << " ";
    for (int j = (c); j < (ff); j++) cout << f[j] << " ";
    c = min((int)f.size() - 1, ff);
    cout << "\n";
  }
  return 0;
}
