#include <iostream>
#include <fstream>
#include <cmath>
#include <algorithm>
#include <stack>
#include <vector>
#include <random>
#include <unordered_set>
#include <bitset>
#include <map>
#include <queue>
#include <iomanip>
#include <limits>
using namespace std;
typedef long long ll;
//#define P pair<ll,ll>
#define FOR(I,A,B) for(ll I = ll(A); I < ll(B); ++I)
#define FORR(I,A,B) for(ll I = ll((B)-1); I >= ll(A); --I)
#define TO(x,t,f) ((x)?(t):(f))
#define SORT(x) (sort(x.begin(),x.end())) // 0 2 2 3 4 5 8 9
#define POSL(x,v) (lower_bound(x.begin(),x.end(),v)-x.begin()) //xi>=v  x is sorted
#define POSU(x,v) (upper_bound(x.begin(),x.end(),v)-x.begin()) //xi>v  x is sorted
#define NUM(x,v) (POSU(x,v)-POSL(x,v))  //x is sorted
#define REV(x) (reverse(x.begin(),x.end())) //reverse
ll gcd(ll a,ll b){if(a%b==0)return b;return gcd(b,a%b);}
ll lcm(ll a,ll b){ll c=gcd(a,b);return ((a/c)*(b/c)*c);}
#define NEXTP(x) next_permutation(x.begin(),x.end())
const ll INF=ll(1e16)+ll(7);
const ll MOD=1000000007LL;
#define out(a) cout<<fixed<<setprecision((a))


template <typename T>
class Seg_Tree{
public: // 0-index
	vector<T> dat;
	T initial,M;
	int n;
	T unite(T a,T b){//
		return a+b;
	}
	Seg_Tree(int n0_=1,T initial_=1,T M_=1){
		initsize(n0_,initial_,M_);
	}
	void initsize(int n0,T initial_,T M_){
		M = M_;
		initial = initial_;
		int k=1;
		while(1){
			if(n0<=k){
				n=k;
				dat.resize(2*n-1);
				for(int i=0;i<2*n-1;i++)dat[i]=initial;
				break;
			}
			k*=2;
		}
	}

	//i banme wo x nisuru
	void update(int i,T x){
		i += n-1;
		dat[i] = x;
		while(i>0){
			i = (i-1) / 2;
			dat[i] = unite(dat[i*2+1],dat[i*2+2]);
		}
	}

	//[a,b)
	T query0(int a,int b,int k,int l,int r){
		if(r<=a || b<=l)return initial;
		if(a<=l && r<=b)return dat[k];
		else{
			T vl = query0(a,b,k*2+1,l,(l+r)/2);
			T vr = query0(a,b,k*2+2,(l+r)/2,r);
			return unite(vl,vr);
		}
	}

	//return [a,b)
	T query(int a,int b){
		return query0(a,b,0,0,n);
	}

	T get_except(int ind){
		T vl = query(0,ind);
		T vr = query(ind+1,n);
		return unite(vl,vr);
	}

	T get_all(){
		return query(0,n);
	}
};

vector<int> leaf(const vector<int> &u,const vector<int> &v){
	int N = u.size() + 1;
	vector<int> G(N,0),res;
	for(int i=0;i<N-1;i++){
		G[u[i]]++;
		G[v[i]]++;
	}
	for(int i=0;i<N;i++){
		if(G[i] == 1){
			res.push_back(i);
		}
	}
	return res;
}

vector< pair<int,int> > leaf_to_root(const vector<int> &u,const vector<int> &v,const int root){
	// return <parent,child>
	int yet = 1000000000;
	vector<int> d(u.size()+1,yet);
	vector< pair<int,int> > res;
	queue<int> Q;
	Q.push(root);
	d[root] = 0;
	vector< vector<int> > G(u.size()+1);
	for(int i=0;i<u.size();i++){
		G[u[i]].push_back(v[i]);
		G[v[i]].push_back(u[i]);
	}
	while( Q.size() ){
		int now = Q.front();
		Q.pop();
		for(auto nex:G[now]){
			if(d[nex]!=yet)continue;
			d[nex] = d[now] + 1;
			Q.push(nex);
			res.push_back( make_pair(now,nex) );
		}
	}
	reverse(res.begin(), res.end());
	return res;
}


int main(){


	int N;
	cin >> N;
	vector<int> x(N-1),y(N-1);
	FOR(i,0,N-1) cin >> x[i] >> y[i];
	FOR(i,0,N-1) x[i]--,y[i]--;


	vector< vector<int> > G(N);
	for(int i=0;i<N-1;i++){
		G[x[i]].push_back(y[i]);
		G[y[i]].push_back(x[i]);
	}
	vector< map<int,int> > ma(N);
	for(int i=0;i<N;i++){
		for(int j=0;j<G[i].size();j++){
			ma[ i ][ G[i][j] ] = j;
		}
	}

	vector< Seg_Tree<double> > dp(N);
	for(int i=0;i<N;i++){
		dp[i].initsize(G[i].size(),0,MOD);
	}

	auto route = leaf_to_root(x,y,0);
	for(auto a:route){
		int p = a.first;
		int c = a.second;
		double x = 0;
		if(G[c].size() != 1){
			double y = G[c].size();
			x = dp[c].get_except(ma[c][p]) / (y - 1.0); 
		}
		dp[p].update(ma[p][c], x+1.0 );
	}

	reverse(route.begin(),route.end());
	for(auto a:route){
		int c = a.second;
		int p = a.first;
		double x = 0;
		if(G[p].size() != 1){
			double y = (double) G[p].size();
			x = dp[p].get_except(ma[p][c]) / (y - 1.0); 
		}
		dp[c].update( ma[c][p] , x+1.0 );
	}

	for(int i=0;i<N;i++){
		out(10) << dp[i].get_all()/G[i].size() << endl;
	}


}


Measured memory_bytes: 59636