### BUGGY CODE ###

#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(1000000)

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

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

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

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

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



#input1 = input2

output1_2='''
5 7
'''

inputXs = [input1, input2, input3, 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'])
def Edge(x,y):
    return (x,y)

def reroot(root0, n, es_vwise, dp_es_vwise, e_init, noe_vwise, pe_vwise):

    def dfs1(v,v_par):
        nonlocal es_vwise, dp_es_vwise, e_init, vpar_v
        stack = [(v,v_par)]
        while stack:
            (v,v_par) = stack.pop()
        
        #print('es_vwise[v]',v,es_vwise[v])
        ret = e_init
        #ret = Edge(-INF,-INF)

        
        for i in range(len(es_vwise[v]) ):
            e_local = es_vwise[v][i]
            if (e_local[0] == v_par):
                print('this-part should not be printed')
                vpar_v[v] = i
                continue
            
            dp_es_vwise[v][i] = lift(dfs1(e_local[0], v), e_local[1]  )
            #dp_es_vwise[v][i] = lift(dfs1(e_local[0], v), e_local[1] )
            ret = merge(ret, dp_es_vwise[v][i] )
        return ret

    def dfs2(v, t):
        # bundlable_parental_edge = t
        nonlocal ans, es_vwise, dp_es_vwise, vpar_v, e_init
        nonlocal pe_vwise
        
        if (vpar_v[v] is not None):
            pass
            #lift(parental_edge, gparental_edge)
            #dp_es_vwise[v][vpar_v[v]] = lift(t,es_vwise[v][vpar_v[v]][1] )
        
        l = len(es_vwise[v])
        dpl = [e_init for i in range(l+1) ]
        dpr = [e_init for i in range(l+1) ]
     
        if (pe_vwise[v] is not None):
            v0, v1, w = pe_vwise[v]            
            dpr[l] = lift(t,w)    
    
        for i in range(l):
            dpl[i+1] = merge(dpl[i], dp_es_vwise[v][i])
        for i in range(l-1,-1,-1):
            dpr[i] = merge(dpr[i+1], dp_es_vwise[v][i])
            #l: 0->1, l-1->l
            #r: l->l-1, 1->0

        ans[v] = dpr[0]

        for i in range(l):
            if (i == vpar_v[v]):
                print('continue, l',0)
                continue
            u = es_vwise[v][i][0]
                
            dfs2(u, merge(dpl[i], dpr[i+1]) )

    def lift(a,w):
        if a[1] == 0:
            return (w,1)
        
        return ( (a[0] / a[1]) + w, 1)

    
    def merge(a,b):
        # print("merge:",a,b)
        return (a[0] + b[0], a[1]+b[1])

    nov = n
    vpar_v = [None for i in range(nov)]

    
    ans = [Edge(0,-INF) for i in range(nov)]    

    dfs1(root0,None)   
    #0 must be root?

    dfs2(root0,None)
    ret = 0
    
    for i in range(len(ans)):
        #print(f'i:{i} ans:{ans[i]}')
        print(float(ans[i][0] / ans[i][1]))

    return ans


def virtual_undirected(n,st_list): #　undirected, quasi-directed
    #print('arg:',n,st_list)
    edst_vwise0 =  edge_dst_s_vwise0 =  [ [] for i in range(n)]
    edst_vwise1 =  [ [] for i in range(n)]
    seen = [False for _ in range(n)]
    vmin = INF
    for st in st_list:
        s,t = st
        edst_vwise0[s].append(t)
        edst_vwise0[t].append(s)
        vmin = min(vmin,s,t)
    
    seen[vmin] = True
    stack = [vmin]
    
    while(stack):
        vcur = stack.pop()
        for vnext in edst_vwise0[vcur]:
            if (seen[vnext]):
                continue
            
            stack.append(vnext)
            edst_vwise1[vcur].append(vnext)
            seen[vnext] = True
    
    #print('edst_vwise',edst_vwise0,edst_vwise1)
    st_list1 = [ ]
    for s in range(n):
        for t in edst_vwise1[s]:
            #print('s,t',s,t)
            st_list1.append((s,t))
    return vmin,st_list1



def main():

    es_vwise = [ [] for i in range(n)]
    dp_es_vwise = [ [] for i in range(n)]
    pe_vwise = [ None for i in range(n)]    
    
    edges_vwise = es_vwise ; parental_edge_vwise = pe_vwise

    def v_add_edge(v,u,w):
        es_vwise[v].append((u,w))
        dp_es_vwise[v].append((0, -INF))
    
    
    vmin, st_list1 = virtual_undirected(n,st_list)
    #st_list2 = st_list
    st_list2 = st_list1
    
    for st in st_list2:
        s,t = st
        #print(stw)
        v_add_edge(s,t,1)
        pe_vwise[t] = (s,t,1)
        
    e_init = (0,0)

    reroot(vmin, n, es_vwise, dp_es_vwise, e_init, noe_vwise, pe_vwise)

main()

### FIXED CODE ###

def main():
    import sys
    input = sys.stdin.readline
 
    N = int(input())
 
    G = [[] for _ in range(N)]
    for _ in range(N - 1):
        u, v = map(int, input().split())
        u -= 1
        v -= 1
        G[u].append(v)
        G[v].append(u)
 
    connect = [len(g) for g in G]
 
    #根を0として木を構築
    root = 0
    stack = [root]
    order = []
    lst = [0] * N
    while len(stack) != 0:
        tmp = stack.pop()
        order.append(tmp)
        for to in G[tmp]:
            if to == lst[tmp]:
                continue
            lst[to] = tmp
            stack.append(to)
        
    dp1 = [0] * N
    for v in order[::-1]:
        d = connect[v]
        if v != root and d == 1:
            continue
        x = sum(dp1[c] for c in G[v])
        if v == root:
            dp1[v] = x/connect[v] + 1
        else:
            dp1[v] = x/(connect[v] - 1) + 1
 
    dp2 = [0] * N
    for v in order:
        d = connect[v]
        n_child = d if v == root else d - 1
        S = dp1[v] * n_child
        if v != root:
            S += dp2[v] + 1
        for c in G[v]:
            if c == lst[v]:
                continue
            if d == 1:
                dp2[c] = 0
            else:
                dp2[c] = (S - dp1[c] - 1)/(d - 1)
 
    ans = []
    for v in range(N):
        d = connect[v]
        n_child = d if v == root else d - 1
        S = dp1[v] * n_child
        if v != root:
            S += dp2[v] + 1
        ans.append(S/d)
 
    print (*ans, sep = '\n')
 
    # print (dp1)
    # print (dp2)
 
if __name__ == '__main__':
    main()