#include<iostream>
#include<vector>
using namespace std;
vector<int>x[180000], Z, y[180000], z[180000];
int n, a[180000], b[180000], dist[180000]; long double dp[180000], dp2[180000];
void dfs(int pos, int rec) {
if (dist[pos] != 999999999)return;
dist[pos] = rec; Z.push_back(pos);
for (int i = 0; i < x[pos].size(); i++) {
dfs(x[pos][i], rec + 1);
}
}
int main() {
cin >> n; for (int i = 0; i < n - 1; i++) { cin >> a[i] >> b[i]; x[a[i]].push_back(b[i]); x[b[i]].push_back(a[i]); }
//int pos = 1; for (int i = 1; i <= n; i++) { if (x[i].size() == 1)pos = i; }
for (int i = 1; i <= n; i++)dist[i] = 999999999; dfs(1, 0);
for (int i = 0; i < n - 1; i++) {
if (dist[a[i]] > dist[b[i]]) { y[b[i]].push_back(a[i]); z[a[i]].push_back(b[i]); }
if (dist[a[i]] < dist[b[i]]) { y[a[i]].push_back(b[i]); z[b[i]].push_back(a[i]); }
}
if(Z.size()!=n)return 0;
if(n<=0 || n>150000)return 0;
for (int i = Z.size() - 1; i >= 0; i--) {
long double E = 0;
for (int j = 0; j < y[Z[i]].size(); j++)E += dp[y[Z[i]][j]] + 1;
if (y[Z[i]].size() >= 1) { E /= y[Z[i]].size(); } dp[Z[i]] = E;
}
for (int i = 0; i < Z.size(); i++) {
long double E = 0;
for (int j : x[Z[i]]) {
if(dist[Z[i]] < dist[j])E += dp[j] + 1;
if (dist[Z[i]] > dist[j]) {
if (x[j].size() == 1)E += 1;
else E += (dp2[j] * x[j].size() - (dp[Z[i]] + 1)) / (x[j].size() - 1) + 1;
}
}
if (x[Z[i]].size() >= 1) { E /= x[Z[i]].size(); }
dp2[Z[i]] = E;
}
for (int i = 1; i <= n; i++) {
printf("%.12Lf\n", dp2[i]);
}
return 0;
}
I2luY2x1ZGU8aW9zdHJlYW0+CiNpbmNsdWRlPHZlY3Rvcj4KdXNpbmcgbmFtZXNwYWNlIHN0ZDsKIAp2ZWN0b3I8aW50PnhbMTgwMDAwXSwgWiwgeVsxODAwMDBdLCB6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