Problem: In Berland there are n cities and n - 1 bidirectional roads. Each road connects some pair of cities, from any city you can get to any other one using only the given roads.

In each city there is exactly one repair brigade. To repair some road, you need two teams based in the cities connected by the road to work simultaneously for one day. Both brigades repair one road for the whole day and cannot take part in repairing other roads on that day. But the repair brigade can do nothing on that day.

Determine the minimum number of days needed to repair all the roads. The brigades cannot change the cities where they initially are.

Input

The first line of the input contains a positive integer n (2 ≤ n ≤ 200 000) — the number of cities in Berland.

Each of the next n - 1 lines contains two numbers ui, vi, meaning that the i-th road connects city ui and city vi (1 ≤ ui, vi ≤ n, ui ≠ vi).

Output

First print number k — the minimum number of days needed to repair all the roads in Berland.

In next k lines print the description of the roads that should be repaired on each of the k days. On the i-th line print first number di — the number of roads that should be repaired on the i-th day, and then di space-separated integers — the numbers of the roads that should be repaired on the i-th day. The roads are numbered according to the order in the input, starting from one.

If there are multiple variants, you can print any of them.

Examples

Input

4
1 2
3 4
3 2


Output

2
2 2 1
1 3


Input

6
3 4
5 4
3 2
1 3
4 6


Output

3
1 1 
2 2 3 
2 4 5 

Note

In the first sample you can repair all the roads in two days, for example, if you repair roads 1 and 2 on the first day and road 3 — on the second day.

Solution (in CPP):

Solution:
#include <bits/stdc++.h>
const double pi = 3.14159265359;
const int MOD = 1000000007;
const int dr[4] = {-1, 1, 0, 0};
const int dc[4] = {0, 0, -1, 1};
double sinA(double dig) { return sin(dig * pi / 180); }
double cosA(double dig) { return cos(dig * pi / 180); }
double tanA(double dig) {
  int we = dig;
  if (we == dig) {
    if (we % 90 == 0) {
      if ((we / 90) % 2 == 1)
        std::cout << "ERROR\n";
      else
        return 0;
    }
  }
  return tan(dig * pi / 180);
}
double secA(double dig) {
  int qw = cos(dig * pi / 180);
  if (qw == 0)
    std::cout << "ERROR\n";
  else
    return (1 / qw);
}
double cosecA(double dig) {
  int qw = sin(dig * pi / 180);
  if (qw == 0)
    std::cout << "ERROR\n";
  else
    return (1 / qw);
}
double cotA(double dig) {
  int qw = tan(dig * pi / 180);
  if (qw == 0)
    std::cout << "ERROR\n";
  else
    return (1 / qw);
}
bool isPrime(long long num) {
  if (num < 0) num *= -1;
  if (num == 1 || num == 0)
    return false;
  else if (num == 2)
    return true;
  else {
    if (num % 2 == 0) {
      return false;
    } else
      for (int x = 3; x <= sqrt(num); x += 2) {
        if (num % x == 0) {
          return false;
        }
      }
    return true;
  }
}
long long gcd(long long A, long long B) {
  if (B == 0) return A;
  return gcd(B, A % B);
}
long long lcm(long long f, long long l) { return (f / gcd(f, l) * l); }
long long fact(long long number) {
  if (number < 0) number *= -1;
  if (number == 0) return 1;
  if (number == 1)
    return number;
  else
    return number * fact(number - 1);
}
long long fib(long long n) {
  auto sqrt_5 = std::sqrt(5);
  if (n == 0) return 0;
  if (n == 1) return 1;
  return static_cast<long long>(
      (std::pow(1 + sqrt_5, n) - std::pow(1 - sqrt_5, n)) /
      (std::pow(2, n) * sqrt_5));
}
long long cdiv(long long a, long long b) {
  return a / b + ((a ^ b) > 0 && a % b);
}
long long fdiv(long long a, long long b) {
  return a / b - ((a ^ b) < 0 && a % b);
}
int power(int x, int n) {
  if (n == 0) return 1;
  int temp = power(x, n / 2);
  temp *= temp;
  if (n % 2) temp *= x;
  return temp;
}
long long powerMOD(long long x, long long n, long long m) {
  if (n == 0) return (1);
  long long temp = powerMOD(x, n / 2, m);
  temp = ((temp % m) * (temp % m)) % m;
  if (n % 2) temp = ((temp % m) * (x % m)) % m;
  return temp;
}
int ETF(int n) {
  int ans = 1;
  for (int x = 2; x * x <= n; x++) {
    if (n % x == 0) {
      int count = 0;
      while (n % x == 0) {
        count++;
        n /= x;
      }
      ans *= (power(x, count - 1) * (x - 1));
    }
  }
  if (n != 1) ans *= (n - 1);
  return ans;
}
long long SUM(long long number) {
  long long ans = 0;
  while (number) {
    ans += number % 10;
    number /= 10;
  }
  return ans;
}
std::map<long long, long long> f;
long long fibb(long long n) {
  if (f.count(n)) return f[n];
  if (n == 0) return 0;
  if (n == 1 || n == 2) return 1;
  if (n % 2 == 0) {
    long long k = n / 2;
    long long ret1 = fibb(k - 1), ret2 = fibb(k);
    return f[n] = ((((2ll * ret1) % MOD + ret2) % MOD) * ret2) % MOD;
  } else {
    long long k = (n + 1) / 2;
    long long ret1 = fibb(k - 1), ret2 = fibb(k);
    return f[n] = ((ret1 * ret1) % MOD + (ret2 * ret2) % MOD) % MOD;
  }
}
void generateNthrow(int N) {
  int prev = 1;
  std::cout << prev;
  for (int i = 1; i <= N; i++) {
    int curr = (prev * (N - i + 1)) / i;
    std::cout << ", " << curr;
    prev = curr;
  }
}
int logNM(int num1, int num2) {
  int counter = 0;
  while (num2) {
    num2 /= num1;
    counter++;
  }
  return counter + 1;
}
const int S = 200007;
std::vector<std::pair<int, int>> v[S];
std::vector<int> ans[S];
void dfs(int node, int par, int cnt) {
  int z = 0;
  for (auto ch : v[node]) {
    if (ch.first == par) continue;
    z++;
    if (z == cnt) z++;
    dfs(ch.first, node, z);
    ans[z].push_back(ch.second);
  }
}
void run() {
  int num;
  std::cin >> num;
  for (int x = 1; x < num; x++) {
    int a, b;
    std::cin >> a >> b;
    v[a].push_back({b, x});
    v[b].push_back({a, x});
  }
  dfs(1, -1, 0);
  int counter = 0;
  for (int x = 0; x < S; x++) {
    if (ans[x].size()) counter++;
  }
  std::cout << counter << "\n";
  for (int x = 0; x < S; x++) {
    if (ans[x].size()) {
      std::cout << ans[x].size() << " ";
      for (auto z : ans[x]) std::cout << z << " ";
      std::cout << "\n";
    }
  }
}
int main() { run(); }