// Slower C++ solution:
#include<bits/stdc++.h>

using namespace std;

using ll = long long;



const int N = 150000;

vector<int> g[N];

double dp[N];

double dp1[N];

double dp2[N];

double ans[N];



// †全方位木DP†はO(N)頂点からやると落とされちゃうめう



void dfs(int i, int p = -1) {

  int sz = (g[i].size() - (p != -1));

  for(int j : g[i]) if(j != p) {

    dfs(j, i);

    dp[i] += (1 + dp1[j]);

    dp1[i] += (1 + dp1[j]) / sz;

  }

}



void dfs2(int i, int p = -1) {

  ans[i] = dp[i] + (p != -1 ? dp2[i] : 0);

  for(int j : g[i]) if(j != p) {

    dp2[j] = 1 + (ans[i] - (1 + dp1[j])) / (g[i].size() - 1); /// コーナーに気をつけよう

    dfs2(j, i); ////

  }

  ans[i] /= g[i].size();

}



int main() {

  ios::sync_with_stdio(false), cin.tie(0);

  int n;

  cin >> n;

  if(n == 1) { //

    cout << 0.0 << endl;

    return 0;

  }

  if(n == 2) { //

    cout << 1.0 << endl;

    cout << 1.0 << endl;

    return 0;

  }

  for(int i = 0; i < n - 1; i++) {

    int a, b; cin >> a >> b; a--; b--;

    g[a].emplace_back(b);

    g[b].emplace_back(a);

  }

  int t = 0;

  for(int i = 0; i < n; i++) if(g[i].size() >= 2) t = i; /// はい

  dfs(t);

  dfs2(t);

  cout << fixed << setprecision(7);

  for(int i = 0; i < n; i++) cout << ans[i] << endl;

}




// Faster C++ solution for the same problem (measured speedup: 4.766123912094x):
// includes {{{

#include<iostream>

#include<iomanip>

#include<algorithm>

#include<vector>

#include<stack>

#include<queue>

#include<map>

#include<set>

#include<tuple>

#include<cmath>

#include<random>

#include<cassert>

#include<bitset>

#include<cstdlib>

// #include<deque>

// #include<multiset>

// #include<cstring>

// #include<bits/stdc++.h>

// }}}

using namespace std;

using ll = long long;



/// --- ReRooting {{{ ///



#include <functional>

#include <vector>

template < class Monoid >

struct ReRooting {

  using size_type = std::size_t;

  using edge_type = std::tuple< size_type, size_type, size_type >;

  using graph_type = std::vector< std::vector< edge_type > >;

  using T = typename Monoid::T;

  using dig_f_type = std::function< T(T, size_type edge_id, size_type from, size_type to) >;

  using after_f_type = std::function< T(T, size_type vertex_id, size_type degree_of_this) >;

  using vector_bool_type = std::vector< int >;

  graph_type graph;



  size_type n;



  std::vector< std::vector< T > > dp;

  std::vector< vector_bool_type > did;

  std::vector< std::vector< T > > L;

  std::vector< std::vector< T > > R;



  dig_f_type dig;

  after_f_type after;

  static T default_dig(const T&a, ...) {

    return a;

  }

  static T default_after(const T&a, ...) {

    return a;

  }



  bool built;



  ReRooting() {}

  ReRooting(size_type n, dig_f_type dig = default_dig, after_f_type after = default_after) : dig(dig), after(after) {

    clear(n);

  }

  ReRooting(std::vector<std::vector<int>> graph, dig_f_type dig = default_dig, after_f_type after = default_after) : ReRooting(graph.size(), dig, after) {

    for(size_type from = 0; from < n; from++) {

      for(auto to : graph[from]) if(to < from) {

        add_edge(from, to);

      }

    }

  }



  void clear() { clear(n); }



  void clear(size_type n) {

    this->n = n;

    graph.resize(n);

    graph.assign(n, std::vector< edge_type >());

    dp.resize(n);

    dp.assign(n, std::vector< T >());

    did.resize(n);

    did.assign(n, vector_bool_type());

    L.resize(n);

    L.assign(n, std::vector< T >());

    R.resize(n);

    R.assign(n, std::vector< T >());

    built = 0;

  }



  size_type added = 0;

  void add_edge(size_type a, size_type b, size_type id = static_cast<size_type>(-1)) {

    assert(a < n && b < n && a != b);

    if(id == static_cast<size_type>(-1)) id = added;

    graph[a].emplace_back(b, graph[b].size(), id);

    graph[b].emplace_back(a, graph[a].size() - 1, id);

    added++;

  }



  void set_dig(dig_f_type dig = default_dig) { this->dig = dig; }



  void set_after(after_f_type after = default_after) { this->after = after; }



  void build() {

    assert(!built);

    assert(added == n - 1);

    built = 1;

    if(n == 0) return;

    for(size_type i = 0; i < n; i++) {

      dp[i].resize(graph[i].size() + 1);

      did[i].resize(graph[i].size() + 1);

      L[i].reserve(graph[i].size() + 1);

      R[i].reserve(graph[i].size() + 1);

    }

    dfs(0, graph[0].size(), 1);

  }



public:

  T dfs(size_type i) {

    assert(built);

    return dfs(i, graph[i].size(), 0);

  }



  T dfs(size_type i, size_type k) {

    assert(built);

    assert(k <= graph[i].size());

    return dfs(i, k, 0);

  }



  T dfs_from(size_type i, size_type j) {

    assert(built);

    assert(j < n);

    // TODO : どうする?

    // return dfs(i, , 0);

  }



private:

  T dfs(size_type i, size_type p, bool f) {

    int deg = graph[i].size() - static_cast< size_type >(p != graph[i].size());

    if(did[i][p]) return dp[i][p];

    did[i][p] = 1;

    T res = Monoid::identity();

    if(f || p == graph[i].size()) {

      // O(deg)

      // go only child



      if(p == graph[i].size()) {

        for(auto to : graph[i]) {

          size_type j, rev, edge_id;

          std::tie(j, rev, edge_id) = to;

          L[i].push_back(dig(dfs(j, rev, f), edge_id, i, j));

        }

        R[i] = L[i];

        for(int x = 1; x < deg; x++) L[i][x] = Monoid::op(L[i][x - 1], L[i][x]);

        for(int x = deg - 2; x >= 0; x--) R[i][x] = Monoid::op(R[i][x], R[i][x + 1]);

        res = L[i].back();

      } else {

        for(size_type x = 0; x < graph[i].size(); x++)

          if(x != p) {

            size_type j, rev, edge_id;

            std::tie(j, rev, edge_id) = graph[i][x];

            res = Monoid::op(res, dig(dfs(j, rev, f), edge_id, i, j));

          }

      }

    } else {

      // O(1)

      dfs(i, graph[i].size(), f);

      res = Monoid::op(p >= 1 ? L[i][p - 1] : Monoid::identity(),

                       p + 1 < R[i].size() ? R[i][p + 1] : Monoid::identity());

    }

    return dp[i][p] = after(res, i, deg);

  }

};



/// }}}--- ////



// my monoid, m-act {{{

struct MyMonoid {

  using T = double;

  static T op(const T &a, const T &b) { return a + b; }

  static constexpr T identity() { return 0; }

};

// }}}



using rerooting = ReRooting<MyMonoid>;

using T = rerooting::T;



T dig(T a, int id, int from, int to) {

  return a + 1;

}



T after(T a, int i, int deg) {

  if(deg == 0) return a;

  return a / deg;

}



const int N = 1e5;

std::vector<std::vector<int>> g;

int n;

int main() {

  std::ios::sync_with_stdio(false), std::cin.tie(0);

  cin >> n;

  g.resize(n);

  for(int i = 0; i < n - 1; i++) {

    int a, b; std::cin >> a >> b;

    a--; b--;

    g[a].emplace_back(b);

    g[b].emplace_back(a);

  }

  rerooting rr(g, dig, after);

  rr.build();

  cout << fixed << setprecision(10);

  for(int i = 0; i < n; i++) cout << rr.dfs(i) << "\n";

  return 0;

}