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 CPP):

Solution:
#include <bits/stdc++.h>
using namespace std;
const long double pi = 3.1415926535897932384626433832795;
const long double eps = 1e-10;
const long long prime = 239;
const long long MOD = 1e9 + 7;
const long long INF = 1e18;
const int BIG = 1e9 + 239;
const int MAX_N = 101;
const int MAX_T = (1 << 18);
const int MAX_LOG = 19;
const int dx[4] = {0, -1, 0, 1};
const int dy[4] = {-1, 0, 1, 0};
int n;
vector<pair<int, int> > r;
vector<vector<pair<int, int> > > v(MAX_N);
vector<vector<bool> > f(MAX_N);
long double pos[MAX_N];
void dfs(int p, int pr) {
  if (pr == -1) {
    int kol = v[p].size();
    long double r = 2.0 / (long double)(kol);
    long double ang = 0;
    int it = 0;
    for (pair<int, int> t : v[p]) {
      if (f[p][it])
        pos[t.second] = ang;
      else {
        long double nw = ang + 1;
        if (nw >= 2) nw -= 2;
        pos[t.second] = nw;
      }
      ang += r;
      if (ang >= 2) ang -= 2;
      it++;
    }
  } else {
    int z = 0;
    for (int i = 0; i < v[p].size(); i++)
      if (v[p][i].first == pr) z = i;
    int kol = v[p].size();
    long double r = 2.0 / (long double)(kol);
    long double ang = pos[v[p][z].second];
    if (!f[p][z]) {
      ang = ang + 1;
      if (ang >= 2) ang -= 2;
    }
    int it = z;
    vector<pair<int, int> > now;
    for (int j = z; j < z + kol; j++) now.push_back(v[p][j % kol]);
    for (pair<int, int> t : now) {
      if (f[p][it])
        pos[t.second] = ang;
      else {
        long double nw = ang + 1;
        if (nw >= 2) nw -= 2;
        pos[t.second] = nw;
      }
      ang += r;
      if (ang >= 2) ang -= 2;
      it = (it + 1) % kol;
    }
  }
  for (pair<int, int> t : v[p])
    if (t.first != pr) dfs(t.first, p);
}
int main() {
  cin.sync_with_stdio(0);
  int n;
  cin >> n;
  for (int i = 0; i < n - 1; i++) {
    int a, b;
    cin >> a >> b;
    a--, b--;
    v[a].push_back(make_pair(b, i));
    v[b].push_back(make_pair(a, i));
    r.push_back(make_pair(a, b));
    f[a].push_back(true);
    f[b].push_back(false);
  }
  for (int i = 0; i < n - 1; i++) pos[i] = -1;
  dfs(0, -1);
  cout << fixed << setprecision(20);
  cout << n - 1 << "\n";
  for (int i = 0; i < n - 1; i++) {
    cout << "1 " << i + 1 << " ";
    if (pos[i] >= 1) {
      swap(r[i].first, r[i].second);
      pos[i] -= 1;
    }
    cout << r[i].first + 1 << " " << r[i].second + 1 << " " << pos[i] << "\n";
  }
  return 0;
}