#include <stdio.h>
#include <cstdio>
#include <iostream>
#include <iomanip>
#include <queue>
#include <set>
#include <vector>
#include <string>
#include <cstring>
#include <algorithm>
#include <cmath>

int make_rooted_tree(std::vector<std::vector<long long int> > &G, long long int N, long long int root_index, std::vector<std::vector<long long int> > &G_rooted, std::vector<long long int> &par);
// subroutine of make_rooted_tree must not be called in other places
int sub_make_rooted_tree(std::vector<std::vector<long long int> > &G, long long int N, long long int root_index, std::vector<std::vector<long long int> > &G_rooted, std::vector<long long int> &par);

double fill_table1(std::vector<std::vector<long long int> > &G_rooted, long long int index, std::vector<double> &table1);

double fill_table2(std::vector<std::vector<long long int> > &G_rooted, std::vector<long long int> &par, long long int index, std::vector<double> &table1, std::vector<double> &table2);

int main(){

  // read problem
  long long int N, tmp1, tmp2;
  scanf("%lld", &N);
  std::vector<std::vector<long long int> > G(N);
  for(long long int i = 0; i < N-1; i++){
    scanf("%lld%lld", &tmp1, &tmp2);
    G[tmp1-1].push_back(tmp2-1);
    G[tmp2-1].push_back(tmp1-1);
  }

  
  // make rooted tree
  std::vector<std::vector<long long int> > G_rooted(N);
  std::vector<long long int> par(N);

  std::cerr << "start make rooted tree" << std::endl;
  make_rooted_tree(G, N, 0, G_rooted, par);
  std::cerr << "end make rooted tree" << std::endl;

  /*std::cerr << "G_rooted" << std::endl;
  for(long long int i = 0; i < N; i++){
    std::cerr << i << ": ";
    for(long long int j = 0; j < G_rooted[i].size(); j++){
      std::cerr << G_rooted[i][j] << " ";
    }std::cerr << std::endl;
  }std::cerr << std::endl;*/

  // solve problem for root
  std::vector<double> table1(N);
  for(long long int i = 0; i < N; i++){
    table1[i] = -1.0;
  }
  std::cerr << "start fill table1" << std::endl;
  fill_table1(G_rooted, 0, table1);
  std::cerr << "end fill table1" << std::endl;
  
  /*std::cerr << "table1:" << std::endl;
  for(long long int i = 0; i < N; i++){
    std::cerr << table1[i] << " ";
  }std::cerr << std::endl;*/

  
  // solve problem
  std::vector<double> table2(N);
  table2[0] = table1[0];
  for(long long int i = 0; i < G[0].size(); i++){
    fill_table2(G_rooted, par, G[0][i], table1, table2);
  }

  std::cerr << "Answer: " << std::endl;
  for(long long int i = 0; i < N; i++){
    std::cout << std::setprecision(10) << table2[i] << std::endl;
  }

  return 0;
}


int make_rooted_tree(std::vector<std::vector<long long int> > &G, long long int N, long long int root_index, std::vector<std::vector<long long int> > &G_rooted, std::vector<long long int> &par){
  // initialize par and call sub_make_rooted_tree
  par[root_index] = root_index;
  sub_make_rooted_tree(G, N, root_index, G_rooted, par);

  return 0;
}

int sub_make_rooted_tree(std::vector<std::vector<long long int> > &G, long long int N, long long int root_index, std::vector<std::vector<long long int> > &G_rooted, std::vector<long long int> &par){

  for(long long int i = 0; i < G[root_index].size(); i++){
    // for all connected nodes but parent node
    if(G[root_index][i] != par[root_index]){
      par[G[root_index][i]] = root_index;
      G_rooted[root_index].push_back(G[root_index][i]);
      sub_make_rooted_tree(G, N, G[root_index][i], G_rooted, par);
    }
  }

  return 0;
}

double fill_table1(std::vector<std::vector<long long int> > &G_rooted, long long int index, std::vector<double> &table1){
  if(table1[index] > -0.5){
    return table1[index];
  }
  if(G_rooted[index].size()==0){
    table1[index] = 0.0;
    return 0.0;
  }
  else{
    double n_child = G_rooted[index].size();
    double ans = 0.0;
    for(int i = 0; i < G_rooted[index].size(); i++){
      ans += fill_table1(G_rooted, G_rooted[index][i], table1)/n_child;
    }
    ans += 1.0;
    table1[index] = ans;
    return ans;
  }
}

double fill_table2(std::vector<std::vector<long long int> > &G_rooted, std::vector<long long int> &par, long long int index, std::vector<double> &table1, std::vector<double> &table2){

  long long int n1, n2;
  n1 = G_rooted[index].size();
  double ans = table1[index] * (n1*1.0)/(n1+1.0);
  double tmp;

  if(par[par[index]] == par[index]){ // par[index] is root
    n2 = G_rooted[par[index]].size();
  }
  else{
    n2 = G_rooted[par[index]].size()+1; // par[index] is not root
  }

  if(n2 == 1){ // par[index] is a leaf vertex
    ans += 1.0/(n1+1.0);
    table2[index] = ans;
  }
  else{
    tmp = (table2[par[index]] - (table1[index]+1.0)*1.0/n2) * n2/(n2-1.0);
    ans += (tmp + 1.0)/(n1+1.0);
  }

  table2[index] = ans;
  

  for(long long int i = 0; i < G_rooted[index].size(); i++){
    fill_table2(G_rooted, par, G_rooted[index][i], table1, table2);
  }
}

Measured memory_bytes: 27008