#include <bits/stdc++.h>
using namespace std;

using VS = vector<string>;    using LL = long long;
using VI = vector<int>;       using VVI = vector<VI>;
using PII = pair<int, int>;   using PLL = pair<LL, LL>;
using VL = vector<LL>;        using VVL = vector<VL>;

#define ALL(a)  begin((a)),end((a))
#define RALL(a) (a).rbegin(), (a).rend()
#define SZ(a) int((a).size())
#define SORT(c) sort(ALL((c)))
#define RSORT(c) sort(RALL((c)))
#define UNIQ(c) (c).erase(unique(ALL((c))), end((c)))
#define FOR(i, s, e) for (int(i) = (s); (i) < (e); (i)++)
#define FORR(i, s, e) for (int(i) = (s); (i) > (e); (i)-form-)
//#pragma GCC optimize ("-O3") 
#ifdef YANG33
#include "mydebug.hpp"
#else
#define DD(x) 
#endif
const int INF = 1e9;                          const LL LINF = 1e16;
const LL MOD = 1000000007;                    const double PI = acos(-1.0);
int DX[8] = { 0, 0, 1, -1, 1, 1, -1, -1 };    int DY[8] = { 1, -1, 0, 0, 1, -1, 1, -1 };


template <class N, class E>
struct Rerooting {
	int n;
	const vector<vector<E>>& G;
	vector<N> subtreesum;
	vector<vector<N>> dp; // L
	void dfs1(int v, int p) {
		subtreesum[v] = N();
		for (auto e : G[v]) {
			int nx = e.to;
			if (nx == p) continue;
			dfs1(nx, v);
			subtreesum[v] = subtreesum[v] + subtreesum[nx].include_e(v, e);
		}
		subtreesum[v] = subtreesum[v].include_v(v);
	}
	void dfs2(int v, int p, N top) {
		int deg = int(G[v].size());
		dp[v] = vector<N>(deg + 1);
		dp[v][0] = N();
		for (int i = 0; i < deg; i++) {
			int nx = G[v][i].to;
			dp[v][i + 1] =
				dp[v][i] + (nx == p ? top : subtreesum[nx]).include_e(v, G[v][i]);
		}
		N rnode = N();
		dp[v].back() = dp[v].back().include_v(v);
		for (int i = deg - 1; i >= 0; i--) {
			dp[v][i] = (dp[v][i] + rnode).include_v(v);
			int nx = G[v][i].to;
			if (nx != p) dfs2(nx, v, dp[v][i]);
			rnode = rnode + (nx == p ? top : subtreesum[nx]).include_e(v, G[v][i]);
		}
	}
	Rerooting(const vector<vector<E>>& _g) : n(int(_g.size())), G(_g), subtreesum(n), dp(n) {
		dfs1(0, -1);
		dfs2(0, -1, N());
	}
};

template <class N, class E> vector<vector<N>> Rerooting_get(const vector<vector<E>>& g) {
	return Rerooting<N, E>(g).dp;
}

inline int ri() { int in; int y = scanf("%d", &in); return in; }
inline void oi(int i) { printf("%d\n", i); }
inline void od(double i) { printf("%.9f\n", i); }




void solve_S8PC_4_D() {
	int N = ri();
	struct Edge
	{
		int to;
		Edge(int t) :to(t) {}
	};
	vector<vector<Edge>>G(N);
	FOR(i, 0, N - 1) {
		int s = ri() - 1, t = ri() - 1;
		G[s].push_back(Edge(t));
		G[t].push_back(Edge(s));
	}

	struct Node {
		double E;
		int childs;
		Node(double e = 0, int c = 0) :E(e), childs(c) {}
		Node include_e(int, const Edge&) const {
			double resE = 0;
			if (childs) {
				resE = E / childs;
			}
			resE += 1.0;
			return Node(resE, 1);
		}
		Node operator + (const Node& r) const {
			// tree-tree
			return Node(E + r.E, childs + r.childs);
		}
		Node include_v(int) const {
			return *this;
		}
	};

	auto tree_res = Rerooting_get<Node>(G);
	FOR(i, 0, N) {
		Node it = tree_res[i].back();
		double ans = 0;
		DD(de(i + 1, it.E, it.childs));
		if (it.childs) {
			ans = it.E / it.childs;
		}
		od(ans);
	}
}

int main() {
	solve_S8PC_4_D();
}

Measured memory_bytes: 29952