#include <iostream>
#include <string>
#include <vector>
#include <deque>
#include <queue>
#include <algorithm>
#include <set>
#include <map>
#include <bitset>
#include <cmath>
#include <functional>
#include <iomanip>
#define vll vector<ll>
#define vvv vector<vvl>
#define vvi vector<vector<int> >
#define vvl vector<vector<ll> >
#define vv(a, b, c, d) vector<vector<d> >(a, vector<d>(b, c))
#define vvvl(a, b, c, d) vector<vvl>(a, vvl(b, vll (c, d)));
#define rep(c, a, b) for(ll c=a;c<b;c++)
#define re(c, b) for(ll c=0;c<b;c++)
#define all(obj) (obj).begin(), (obj).end()
typedef long long int ll;
typedef long double ld;
//typedef __int128_t lll;
using namespace std;

template<typename T>
struct treeDP{
  vvl G;
  T INIT, ZERO;
  vector<T> TMP_DATA, dat;
  function<T(T, T)> f;
  function<T(T)> g;
  // f: merge g: step
  treeDP(ll n, T init, T zero, function<T(T, T)> func, function<T(T)> func2):
  INIT(init), ZERO(zero), f(func), g(func2){
    G.resize(n+1, vector<ll>(0));
    dat.resize(n+1, zero);
    TMP_DATA.resize(n+1, zero);
  }

  inline void dfs(ll now, ll from){
    ll cnt = 0;
    for(int i=0;i<G[now].size();i++){
      if(G[now][i]==from) continue;
      dfs(G[now][i], now);
      TMP_DATA[now] = f(TMP_DATA[now], g(TMP_DATA[G[now][i]]));
      cnt++;
    }
    if(cnt==0) TMP_DATA[now] = INIT;
    else TMP_DATA[now] /= (ld)cnt;
  }

  inline void dfs2(ll now, ll from, T rev){
    vector<T> left, right;
    for(int i=0;i<G[now].size();i++){
      ll to = G[now][i];
      if(to==from) continue;
      left.push_back(g(TMP_DATA[to]));
      ll s = left.size();
      if(s!=1) left[s-1] = f(left[s-1], left[s-2]);
    }
    ld c = 0;
    for(int i=0;i<G[now].size();i++){
      ll to = G[now][G[now].size()-1-i];
      if(to==from) continue;
      right.push_back(g(TMP_DATA[to]));
      ll s = right.size();
      if(s!=1) right[s-1] = f(right[s-1], right[s-2]);
      c++;
    }
    if(left.size()==0) dat[now] = rev;
    else if(rev==0) dat[now] =  left[left.size()-1];
    else{
      dat[now] = (left[left.size()-1] + rev)/(c+1.0);
    }
    //std::cout << "now" << now << " " << c << " " << left[left.size()-1] << " " << rev << '\n';
    //std::cout << dat[now] << '\n';
    ll cnt = 0;
    for(int i=0;i<G[now].size();i++){
      ll to = G[now][i];
      if(to==from) continue;
      T tmp = rev;
      if(cnt!=0) tmp = f(tmp, left[cnt-1]);
      if(cnt!=right.size()-1) tmp = f(tmp, right[right.size()-2-cnt]);
      dfs2(to, now, g(tmp/c));
      cnt++;
    }
  }
  void insert(ll a, ll b){ G[a].push_back(b);G[b].push_back(a); }
  void calc(){
    ll root = -1;
    for(int i=1;i<=G.size();i++) {
      if(G[i].size()==1||G[i].size()==0) {
        root = i;
        break;
      }
    }
    dfs(root, -1);
    dfs2(root, -1, ZERO);
  }
  T & operator [](int i){return dat[i];}
};


ld mg(ld a, ld b){
  return a+b;
}
ld step(ld a){
  return a+1;
}

int main(int argc, char const *argv[]) {
  ll n;std::cin >> n;
  treeDP<ld> tdp(n+1, 0, 0, mg, step);
  for(int i=0;i<n-1;i++){
    ll a, b;std::cin >> a >> b;
    tdp.insert(a, b);
  }
  tdp.calc();

  //std::cout << "----------" << '\n';
  //for(int i=1;i<=n;i++){
    //std::cout << fixed << setprecision(20) << tdp.TMP_DATA[i] << endl;
  //}
  //std::cout << '\n';
  //std::cout << "----------" << '\n';
  for(int i=1;i<=n;i++){
    std::cout << fixed << setprecision(20) << tdp[i] << '\n';
  }

  return 0;
}


Measured memory_bytes: 55296