#include <bits/stdc++.h>

#ifdef DEBUG
#include <Mylib/Debug/debug.cpp>
#else
#define dump(...)
#endif

/**
 * @title Graph template
 * @docs graph_template.md
 */
template <typename Cost = int> class Edge{
public:
  int from,to;
  Cost cost;
  Edge() {}
  Edge(int to, Cost cost): to(to), cost(cost){}
  Edge(int from, int to, Cost cost): from(from), to(to), cost(cost){}
};

template <typename T> using Graph = std::vector<std::vector<Edge<T>>>;
template <typename T> using Tree = std::vector<std::vector<Edge<T>>>;

template <typename T, typename C> void add_edge(C &g, int from, int to, T w = 1){
  g[from].emplace_back(from, to, w);
}

template <typename T, typename C> void add_undirected(C &g, int a, int b, T w = 1){
  add_edge<T, C>(g, a, b, w);
  add_edge<T, C>(g, b, a, w);
}



/**
 * @title Rerooting DP
 * @docs rerooting.md
 */
namespace rerooting_impl {
  template <typename T, typename U, typename Merge, typename EdgeF, typename VertexF>
  T rec1(
    Tree<U> &tree,
    T id,
    const Merge &merge,
    const EdgeF &f,
    const VertexF &g,
    std::vector<std::vector<T>> &dp,
    int cur,
    int par = -1
  ){
    T acc = id;

    for(int i = 0; i < (int)tree[cur].size(); ++i){
      auto &e = tree[cur][i];
      if(e.to == par) continue;
      dp[cur][i] = rec1(tree, id, merge, f, g, dp, e.to, cur);
      acc = merge(acc, f(dp[cur][i], e));
    }

    return g(acc, cur);
  }

  template <typename T, typename U, typename Merge, typename EdgeF, typename VertexF>
  void rec2(
    const Tree<U> &tree,
    T id,
    const Merge &merge,
    const EdgeF &f,
    const VertexF &g,
    std::vector<std::vector<T>> &dp,
    int cur,
    int par,
    T value
  ){
    const int l = tree[cur].size();

    for(int i = 0; i < l; ++i){
      if(tree[cur][i].to == par){
        dp[cur][i] = value;
      }
    }

    std::vector<T> left(l + 1, id), right(l + 1, id);

    for(int i = 0; i < l - 1; ++i){
      const auto &e = tree[cur][i];
      left[i + 1] = merge(left[i], f(dp[cur][i], e));
    }

    for(int i = l - 1; i >= 1; --i){
      const auto &e = tree[cur][i];
      right[i - 1] = merge(right[i], f(dp[cur][i], e));
    }

    for(int i = 0; i < l; ++i){
      const auto &e = tree[cur][i];
      if(e.to == par) continue;

      rec2(tree, id, merge, f, g, dp, e.to, cur, g(merge(left[i], right[i]), cur));
    }
  }
}

template <typename T, typename U, typename Merge, typename EdgeF, typename VertexF>
auto rerooting(Tree<U> tree, T id, Merge merge, EdgeF f, VertexF g){
  const int N = tree.size();
  std::vector<std::vector<T>> dp(N);
  std::vector<T> ret(N, id);

  for(int i = 0; i < N; ++i) dp[i].assign(tree[i].size(), id);
  rerooting_impl::rec1(tree, id, merge, f, g, dp, 0);
  rerooting_impl::rec2(tree, id, merge, f, g, dp, 0, -1, id);
  for(int i = 0; i < N; ++i){
    for(int j = 0; j < (int)tree[i].size(); ++j){
      ret[i] = merge(ret[i], f(dp[i][j], tree[i][j]));
    }

    ret[i] = g(ret[i], i);
  }

  return ret;
}






namespace solver{
  void solve(){
    std::cin.tie(0);
    std::ios::sync_with_stdio(false);
    
    int N; std::cin >> N;

    Tree<int> tree(N);
    for(int i = 0; i < N - 1; ++i){
      int u, v; std::cin >> u >> v;
      add_undirected(tree, u - 1, v - 1, 1);
    }

    auto merge =
      [](const auto &a, const auto &b){
        return std::make_pair(a.first + b.first, a.second + b.second);
      };
    auto f =
      [](const auto &a, const auto &){
        return a;
      };
    auto g =
      [](const auto &a, int){
        if(a.second == 0){
          return std::make_pair(0.0, 1);
        }else{
          return std::make_pair(a.first / a.second + 1, 1);
        }
      };

    auto res = rerooting<std::pair<double, int>>(tree, {0, 0}, merge, f, g);

    for(auto x : res){
      std::cout << std::fixed << std::setprecision(12) << x.first << "\n";
    }
  }
}

int main(){
  solver::solve();
  return 0;
}


Measured memory_bytes: 61644