Problem:
Max Score: $800$ Points

Problem Statement

There is an undirected connected graph with $N$ vertices and $N-1$ edges. The i-th edge connects u_i and v_i.

E869120 the coder moves in the graph as follows:

He move to adjacent vertex, but he can't a visit vertex two or more times.

He ends move when there is no way to move.

Otherwise, he moves randomly. (equal probability) If he has $p$ way to move this turn, he choose each vertex with $1/p$ probability.

Calculate the expected value of the number of turns, when E869120 starts from vertex i, for all i (1 ≤ i ≤ N).

Input

The input is given from standard input in the following format.

N
u_1 v_1
u_2 v_2
:
u_{N-1} v_{N-1}

Output

In i-th (1 ≤ i ≤ N) line, print the expected vaule of the number of turns E869120 moves.

The relative error or absolute error of output should be within 10^{-6}.

Constraints

$1 \le N \le 150,000$

The graph is connected.

Subtasks

Subtask 1 [ $190$ points ]

There is no vertex which degree is more than 2.

This means the graph looks like a list.

Subtask 2 [ $220$ points ]

1 ≤ N ≤ 1000.

Subtask 3 [ $390$ points ]

There are no additional constraints.

Sample Input 1

4
1 2
2 3
2 4

Sample Output 1

2.0
1.0
2.0
2.0

Sample Input 2

4
1 2
2 4
4 3

Solution in Python (3.4.3) (judge verdict: Wrong Answer)

#recursion-version

#http://judge.u-aizu.ac.jp/onlinejudge/description.jsp?id=GRL_5_A&lang=jp
#http://penguinshunya.hatenablog.com/entry/2019/07/09/003006

import sys
sys.setrecursionlimit(10000)

inpPh = 0
debug = True
#debug = False
if not debug:
    inpPh = 0

input1 ='''
12
1 2
2 3
2 4
4 5
5 6
5 7
6 8
8 9
2 10
10 11
11 12
'''[1:]

input2 ='''
7
1 2
1 3
2 4
2 5
3 6
3 7
'''[1:]

input1bk ='''
4
1 2
2 3
2 4
'''[1:]



#input1 = input2

output1_2='''
5 7
'''

inputXs = [input1, input2,None]

if debug:
    try:
        inputXs.append(inputA0)
    except:
        pass
    else:
        pass

inploc = inpPh - 1 #0,1,2

if inpPh > 0:
    #print('selected_input:\n'+inputXs[inploc])
    #print('')
    pass

inpX_lst = []
if debug and inpPh > 0:
    inpX_lst = inputXs[inploc].splitlines()


if inpPh ==0:
    n = int(input())
else:
    n = int(inpX_lst.pop(0) )

st_list = []
noe_vwise = [0 for _ in range(n)]

for i in range(n-1):
    if inpPh ==0:
        si,ti = tuple(map(lambda x: int(x), input().split() ) )
    else:
        si,ti = tuple(map(lambda x: int(x), inpX_lst.pop(0).split() ) )
    
    noe_vwise[si-1] += 1
    #noe_vwise[ti-1] += 1
    st_list.append((si-1,ti-1))

#print(st_list)

from collections import namedtuple
INF = float('inf')

Edge = namedtuple('Edge', ['to', 'value'])