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.
import java.io.InputStream;
import java.io.OutputStream;
import java.io.PrintWriter;
import java.util.ArrayList;
import java.util.LinkedList;
import java.util.List;
import java.util.Queue;
import java.util.Scanner;

public class PogChamp {
    public static void main(String[] args) {
        new PogChamp().bUrself(System.in, System.out);
    }

    void bUrself(InputStream inputStream, OutputStream outputStream) {
        try (Scanner input = new Scanner(inputStream); PrintWriter output = new PrintWriter(outputStream)) {
            solve(input, output);
        }
    }

    private void solve(Scanner input, PrintWriter output) {
        int n = input.nextInt();
        List<Edge> edges = new ArrayList<>(n - 1);
        for (int i = 1; i < n; ++i) {
            int v1 = input.nextInt(), v2 = input.nextInt();
            edges.add(new Edge(i, v1 - 1, v2 - 1));
        }

        List<List<Integer>> edgeNumbersByColor = new TreeColorer(edges).bfs();
        output.print(edgeNumbersByColor.size());
        for (List<Integer> edgeNumbers : edgeNumbersByColor) {
            output.println();
            output.print(edgeNumbers.size());
            for (Integer edgeNumber : edgeNumbers) {
                output.print(" ");
                output.print(edgeNumber);
            }
        }
    }

    static class TreeColorer {
        final List<List<Edge>> edgesByVertex;

        TreeColorer(List<Edge> edges) {
            // make a list of edges for each vertex
            edgesByVertex = new ArrayList<>(edges.size() + 1);
            for (int i = 0; i < edges.size() + 1; ++i) {
                edgesByVertex.add(new ArrayList<>());
            }

            // add each edge to the lists of both its vertices
            for (Edge e : edges) {
                edgesByVertex.get(e.v1).add(e);
                edgesByVertex.get(e.v2).add(e);
            }
        }

        List<List<Integer>> bfs() {
            Queue<VertexVisit> q = new LinkedList<>();
            // list with edge numbers for each color, will contain all edges painted in each color
            List<List<Integer>> edgeNumbersByColor = new ArrayList<>();
            // -1's mean we don't have a previous vertex and color since this is the first vertex we visit
            q.add(new VertexVisit(0, -1, -1));
            while (!q.isEmpty()) {
                VertexVisit v = q.poll();
                int currentColor = 0;
                // iterate over all edges coming out of the current vertex, need to skip the edge by which we came here
                for (Edge e : edgesByVertex.get(v.currentVertex)) {
                    // one of the vertices of an edge is the current vertex, we need to get the other one
                    int nextVertex;
                    if (e.v1 != v.currentVertex) {
                        nextVertex = e.v1;
                    } else {
                        nextVertex = e.v2;
                    }
                    // if that vertex is the one we just came from, this edge is already colored, no need to do anything
                    if (nextVertex == v.previousVertex) {
                        continue;
                    }

                    // the color of the edge we came here by is already taken, we need to skip it
                    if (currentColor == v.previousColor) {
                        currentColor++;
                    }
                    // if this is the first time we use this color, we need to initialize the list for it
                    while (edgeNumbersByColor.size() <= currentColor) {
                        edgeNumbersByColor.add(new ArrayList<>());
                    }
                    edgeNumbersByColor.get(currentColor).add(e.number);
                    // add the vertex to bfs queue and proceed to other edges, the color is already used so increment it
                    q.add(new VertexVisit(nextVertex, v.currentVertex, currentColor++));
                }
            }
            return edgeNumbersByColor;
        }
    }

    static class VertexVisit {
        final int currentVertex, previousVertex, previousColor;

        VertexVisit(int currentVertex, int previousVertex, int previousColor) {
            this.currentVertex = currentVertex;
            this.previousVertex = previousVertex;
            this.previousColor = previousColor;
        }
    }

    static class Edge {
        final int number, v1, v2;

        Edge(int number, int v1, int v2) {
            this.number = number;
            this.v1 = v1;
            this.v2 = v2;
        }
    }
}
