Problem: The second semester starts at the University of Pavlopolis. After vacation in Vičkopolis Noora needs to return to Pavlopolis and continue her study.

Sometimes (or quite often) there are teachers who do not like you. Incidentally Noora also has one such teacher. His name is Yury Dmitrievich and he teaches graph theory. Yury Dmitrievich doesn't like Noora, so he always gives the girl the most difficult tasks. So it happened this time.

The teacher gives Noora a tree with n vertices. Vertices are numbered with integers from 1 to n. The length of all the edges of this tree is 1. Noora chooses a set of simple paths that pairwise don't intersect in edges. However each vertex should belong to at least one of the selected path.

For each of the selected paths, the following is done:

  1. We choose exactly one edge (u, v) that belongs to the path. 
  2. On the selected edge (u, v) there is a point at some selected distance x from the vertex u and at distance 1 - x from vertex v. But the distance x chosen by Noora arbitrarily, i. e. it can be different for different edges. 
  3. One of the vertices u or v is selected. The point will start moving to the selected vertex. 



Let us explain how the point moves by example. Suppose that the path consists of two edges (v1, v2) and (v2, v3), the point initially stands on the edge (v1, v2) and begins its movement to the vertex v1. Then the point will reach v1, then "turn around", because the end of the path was reached, further it will move in another direction to vertex v2, then to vertex v3, then "turn around" again, then move to v2 and so on. The speed of the points is 1 edge per second. For example, for 0.5 second the point moves to the length of the half of an edge.

A stopwatch is placed at each vertex of the tree. The time that the stopwatches indicate at start time is 0 seconds. Then at the starting moment of time, all points simultaneously start moving from the selected positions to selected directions along the selected paths, and stopwatches are simultaneously started. When one of the points reaches the vertex v, the stopwatch at the vertex v is automatically reset, i.e. it starts counting the time from zero.

Denote by resv the maximal time that the stopwatch at the vertex v will show if the point movement continues infinitely. Noora is asked to select paths and points on them so that res1 is as minimal as possible. If there are several solutions to do this, it is necessary to minimize res2, then res3, res4, ..., resn.

Help Noora complete the teacher's task.

For the better understanding of the statement, see the explanation for the example.

Input

The first line contains single integer n (2 ≤ n ≤ 100) — number of vertices in the given tree.

Each of next n - 1 lines contains two integers u and v (1 ≤ u, v ≤ n, u ≠ v) — vertices connected by an edge.

Guaranteed that input defines a valid tree.

Output

In the first line print single integer paths — number of paths you want to choose.

In the next paths lines print path's descriptions:

  1. Single integer len — number of edges in the current path. 
  2. len integers — indices of the edges in the path. The edges are numbered from 1 to n - 1 in order they are given in input. 
  3. Two integers u and v — means that you put point on the edge between vertices u and v (obviously the edge should belong to the path) and a point will start moving to the vertex v. Note that order of printing of the edge's ends is important. For example if you print "1 2" (without quotes), then point will start moving to vertex 2; but if you print "2 1" (without quotes), then point will start moving to vertex 1. 
  4. Single real number x (0 ≤ x ≤ 1) — distance between point and vertex u (the same vertex that you print first in the third paragraph). 

Scoring

Judge system will generate array res using the output data provided by the participant. Also system will generate array resOptimal by the jury answer. Your answer will be accepted if only for each i (1 ≤ i ≤ n) the following is satisfied: <image>.

Example

Input

3
1 2
2 3


Output

2
1 1 1 2 0.6666666666
1 2 2 3 0.6666666666

Note

Consider an example.

In starting moment of time points are located as following:

<image>

The first path is highlighted in red, the second in blue, green circles represent chosen points, and brown numbers inside vertices — current time at stopwatch. Purple arrows represent direction in which points will move.

In 0.(3) seconds points will be located in following way (before stopwatch reset):

<image>

After stopwatch reset:

<image>

In 1.0 second after the start of moving:

<image>

In 1.(3) seconds after the start of moving (after stopwatch reset):

<image>

Finally, in 2 seconds after the start of moving points return to their initial positions.

<image>

This process will continue infinitely.

Solution (in JAVA):

Solution:
import javax.print.attribute.standard.MediaPrintableArea;
import java.math.BigDecimal;
import java.math.BigInteger;
import java.math.RoundingMode;
import java.io.*;
import java.util.*;
/**
 * Created by Firеfly on 1/1/2017.
 */
public class Task {
    public static void main(String[] args) throws IOException {
        Emaxx emaxx = new Emaxx();
    }
}


class Emaxx {
    FScanner fs;
    PrintWriter pw;
    int n, m;
    Integer W;
    ArrayList<Integer>[] graph;
    int[][] to;
    double[] comes, zh;
    LinkedList<Pair> qoue;
    boolean[] used;
    Emaxx() throws IOException {
        fs = new FScanner(new InputStreamReader(System.in));
        // pw = new PrintWriter(new FileWriter("arithnumbers.out"));
        //  fs = new FScanner(new FileReader("C:\\Users\\Firеfly\\Desktop\\New Text Document.txt"));
        //     fs = new FScanner(new FileReader("input.txt"));;
        //       pw = new PrintWriter("output.txt");
        PrintWriter pw = new PrintWriter(System.out);
        n = fs.nextInt();
        graph = new ArrayList[n];
        for (int i =0 ; i<n; i++)
            graph[i] = new ArrayList<>();
        for (int i = 0; i<n-1; i++) {
            int u = fs.nextInt()-1;
            int v = fs.nextInt()-1;
            graph[u].add(v);
            graph[u].add(i);
            graph[v].add(u);
            graph[v].add(i);
        }
        zh = new double[n-1];
        int si = graph[0].size()/2;
        comes = new double[n]; //dd
        double curr = 0;
        used = new boolean[n];
        to = new int[n-1][2];
        for (int i = 0; i<graph[0].size(); i+=2) {
            comes[graph[0].get(i)] = curr>=1? curr-1 : curr+1;
            if (curr>=1) {
                to[graph[0].get(i + 1)][0] = graph[0].get(i);
                to[graph[0].get(i + 1)][1] = 0;
                zh[graph[0].get(i+1)] = 2-curr;
            }
            else {
                to[graph[0].get(i + 1)][0] = 0;
                to[graph[0].get(i + 1)][1] = graph[0].get(i);
                zh[graph[0].get(i+1)] =1 -curr;
            }
                curr+=2.0/si;
                if (curr>=2)
                    curr-=2;

        }
        used[0] = true;
        for (int i = 0; i<graph[0].size(); i+=2)
            dfs(graph[0].get(i));
        pw.println(n-1);
        for (int i =0 ; i<n-1; i++) {
            pw.println(1 + " " + (i+1) + " " + (to[i][1]+1) + " " + (to[i][0]+1) + " "  + (zh[i]));
        }

        pw.close();
    }

    private void dfs(int v) {
        int si = graph[v].size()/2;
        used[v] = true;
        double cur = comes[v];
        for (int i = 0; i<graph[v].size(); i+=2) {
            if (!used[graph[v].get(i)]) {
                cur+=2.0/si;
                if (cur>=2)
                    cur-=2;
                comes[graph[v].get(i)] = cur>=1? cur-1 : cur+1;
                if (cur<=1) {
                    to[graph[v].get(i + 1)][0] = v;
                    to[graph[v].get(i + 1)][1] = graph[v].get(i);
                    zh[graph[v].get(i+1)] = 1-cur;
                }
                    else{
                        to[graph[v].get(i+1)][0] = graph[v].get(i);
                    to[graph[v].get(i + 1)][1] = v;
                    zh[graph[v].get(i+1)] = 2-cur;
                }
            }
        }
        for (int i = 0; i<graph[v].size(); i+=2) {
            if (!used[graph[v].get(i)])
                dfs(graph[v].get(i));
        }
    }

}

class Triple implements Comparable<Triple> {
    int x, y, c, t;
    Triple(int x1, int y1, int c1) {
        x = x1; y = y1; c = c1;
    }

    @Override
    public int compareTo(Triple triple) {
        return Integer.compare(x, triple.x);
    }
}
class Pair implements Comparable<Pair>{
    long x, y;
    Pair(int x1, int y1) {x = x1; y = y1;}
    Pair(){}
    @Override
    public int compareTo(Pair o) {
        return Long.compare(x, o.x);
    }
}

class Algs {
    public static int[] Z_f(char[] s) {
        int[] zf = new int[s.length];
        zf[0] = -1;
        int l = 0, r= 0;
        for (int i = 1; i<s.length; i++) {
            if (i>r)
            {
                int g = i;
                while (g < s.length && s[g] == s[g-i])
                    g++;
                if (g == i)
                    continue;
                l = i;
                r = g-1;
                zf[i] = g-i;
            } else {
                if (zf[i-l]<=r-i+1)
                    zf[i] = zf[i-l];
                else {
                    int g = r+1;
                    while (g <s.length && s[g] == s[g-i])
                        g++;
                    if (g == r+1)
                        zf[i] = r-i+1;
                    else {
                        zf[i] = g-i;
                        r = g-1;
                        l = i;
                    }
                }
            }
        }
        return zf;
    }
}



class FScanner {
    BufferedReader br;
    StringTokenizer st;
    FScanner(InputStreamReader isr) {
        br = new BufferedReader(isr);
    }

    FScanner(FileReader fr) {
        br = new BufferedReader(fr);
    }

    String nextToken() throws IOException{
        while (st == null || !st.hasMoreTokens()) {
            String s = br.readLine();
            if (s == null)
                return null;
            st = new StringTokenizer(s);
        }
        return st.nextToken();
    }

    int nextInt() throws IOException {
        return Integer.parseInt(nextToken());
    }

    long nextLong() throws IOException {
        return Long.parseLong(nextToken());
    }

    double nextDouble() throws IOException {
        return Double.parseDouble(nextToken());
    }

    String nextLine() throws IOException {
        return br.readLine();
    }

    char nextChar() throws IOException {
        return (char) br.read();
    }
}