Problem: There are n water tanks in a row, i-th of them contains a_i liters of water. The tanks are numbered from 1 to n from left to right.

You can perform the following operation: choose some subsegment [l, r] (1≤ l ≤ r ≤ n), and redistribute water in tanks l, l+1, ..., r evenly. In other words, replace each of a_l, a_{l+1}, ..., a_r by \frac{a_l + a_{l+1} + ... + a_r}{r-l+1}. For example, if for volumes [1, 3, 6, 7] you choose l = 2, r = 3, new volumes of water will be [1, 4.5, 4.5, 7]. You can perform this operation any number of times.

What is the lexicographically smallest sequence of volumes of water that you can achieve?

As a reminder:

A sequence a is lexicographically smaller than a sequence b of the same length if and only if the following holds: in the first (leftmost) position where a and b differ, the sequence a has a smaller element than the corresponding element in b.

Input

The first line contains an integer n (1 ≤ n ≤ 10^6) — the number of water tanks.

The second line contains n integers a_1, a_2, ..., a_n (1 ≤ a_i ≤ 10^6) — initial volumes of water in the water tanks, in liters.

Because of large input, reading input as doubles is not recommended.

Output

Print the lexicographically smallest sequence you can get. In the i-th line print the final volume of water in the i-th tank.

Your answer is considered correct if the absolute or relative error of each a_i does not exceed 10^{-9}.

Formally, let your answer be a_1, a_2, ..., a_n, and the jury's answer be b_1, b_2, ..., b_n. Your answer is accepted if and only if \frac{|a_i - b_i|}{max{(1, |b_i|)}} ≤ 10^{-9} for each i.

Examples

Input


4
7 5 5 7


Output


5.666666667
5.666666667
5.666666667
7.000000000


Input


5
7 8 8 10 12


Output


7.000000000
8.000000000
8.000000000
10.000000000
12.000000000


Input


10
3 9 5 5 1 7 5 3 8 7


Output


3.000000000
5.000000000
5.000000000
5.000000000
5.000000000
5.000000000
5.000000000
5.000000000
7.500000000
7.500000000

Note

In the first sample, you can get the sequence by applying the operation for subsegment [1, 3].

In the second sample, you can't get any lexicographically smaller sequence.

Solution (in CPP):

Solution:
#include <bits/stdc++.h>
using namespace std;
const long long INF(0x3f3f3f3f3f3f3f3fll);
const int inf(0x3f3f3f3f);
template <typename T>
void read(T &res) {
  bool flag = false;
  char ch;
  while (!isdigit(ch = getchar())) (ch == '-') && (flag = true);
  for (res = ch - 48; isdigit(ch = getchar());
       res = (res << 1) + (res << 3) + ch - 48)
    ;
  flag && (res = -res);
}
template <typename T>
void Out(T x) {
  if (x < 0) putchar('-'), x = -x;
  if (x > 9) Out(x / 10);
  putchar(x % 10 + '0');
}
long long gcd(long long a, long long b) { return b ? gcd(b, a % b) : a; }
long long lcm(long long a, long long b) { return a * b / gcd(a, b); }
long long pow_mod(long long x, long long n, long long mod) {
  long long res = 1;
  while (n) {
    if (n & 1) res = res * x % mod;
    x = x * x % mod;
    n >>= 1;
  }
  return res;
}
long long fact_pow(long long n, long long p) {
  long long res = 0;
  while (n) {
    n /= p;
    res += n;
  }
  return res;
}
long long mult(long long a, long long b, long long p) {
  a %= p;
  b %= p;
  long long r = 0, v = a;
  while (b) {
    if (b & 1) {
      r += v;
      if (r > p) r -= p;
    }
    v <<= 1;
    if (v > p) v -= p;
    b >>= 1;
  }
  return r;
}
long long quick_pow(long long a, long long b, long long p) {
  long long r = 1, v = a % p;
  while (b) {
    if (b & 1) r = mult(r, v, p);
    v = mult(v, v, p);
    b >>= 1;
  }
  return r;
}
bool CH(long long a, long long n, long long x, long long t) {
  long long r = quick_pow(a, x, n);
  long long z = r;
  for (long long i = 1; i <= t; i++) {
    r = mult(r, r, n);
    if (r == 1 && z != 1 && z != n - 1) return true;
    z = r;
  }
  return r != 1;
}
bool Miller_Rabin(long long n) {
  if (n < 2) return false;
  if (n == 2) return true;
  if (!(n & 1)) return false;
  long long x = n - 1, t = 0;
  while (!(x & 1)) {
    x >>= 1;
    t++;
  }
  srand(time(NULL));
  long long o = 8;
  for (long long i = 0; i < o; i++) {
    long long a = rand() % (n - 1) + 1;
    if (CH(a, n, x, t)) return false;
  }
  return true;
}
int prime[100000], minprime[100000];
void euler(int n) {
  int c = 0, i, j;
  for (i = 2; i <= n; i++) {
    if (!minprime[i]) prime[++c] = i, minprime[i] = i;
    for (j = 1; j <= c && i * prime[j] <= n; j++) {
      minprime[i * prime[j]] = prime[j];
      if (i % prime[j] == 0) break;
    }
  }
}
struct Tree {
  long long l, r, sum, lazy, maxn, minn;
} tree[100000];
inline void push_up(long long rt) {
  tree[rt].sum = tree[rt << 1].sum + tree[rt << 1 | 1].sum;
  tree[rt].maxn = max(tree[rt << 1].maxn, tree[rt << 1 | 1].maxn);
  tree[rt].minn = min(tree[rt << 1].minn, tree[rt << 1 | 1].minn);
}
inline void push_down(long long rt, long long length) {
  if (tree[rt].lazy) {
    tree[rt << 1].lazy += tree[rt].lazy;
    tree[rt << 1 | 1].lazy += tree[rt].lazy;
    tree[rt << 1].sum += (length - (length >> 1)) * tree[rt].lazy;
    tree[rt << 1 | 1].sum += (length >> 1) * tree[rt].lazy;
    tree[rt << 1].minn += tree[rt].lazy;
    tree[rt << 1 | 1].minn += tree[rt].lazy;
    tree[rt << 1].maxn += tree[rt].lazy;
    tree[rt << 1 | 1].maxn += tree[rt].lazy;
    tree[rt].lazy = 0;
  }
}
inline void build(long long l, long long r, long long rt, long long *aa) {
  tree[rt].lazy = 0;
  tree[rt].l = l;
  tree[rt].r = r;
  if (l == r) {
    tree[rt].sum = aa[l];
    tree[rt].minn = tree[rt].sum;
    tree[rt].maxn = tree[rt].sum;
    return;
  }
  long long mid = (l + r) >> 1;
  build(l, mid, rt << 1, aa);
  build(mid + 1, r, rt << 1 | 1, aa);
  push_up(rt);
}
inline void update_range(long long L, long long R, long long key,
                         long long rt) {
  if (tree[rt].r < L || tree[rt].l > R) return;
  if (L <= tree[rt].l && R >= tree[rt].r) {
    tree[rt].sum += (tree[rt].r - tree[rt].l + 1) * key;
    tree[rt].minn += key;
    tree[rt].maxn += key;
    tree[rt].lazy += key;
    return;
  }
  push_down(rt, tree[rt].r - tree[rt].l + 1);
  long long mid = (tree[rt].r + tree[rt].l) >> 1;
  if (L <= mid) update_range(L, R, key, rt << 1);
  if (R > mid) update_range(L, R, key, rt << 1 | 1);
  push_up(rt);
}
inline long long query_range(long long L, long long R, long long rt) {
  if (L <= tree[rt].l && R >= tree[rt].r) {
    return tree[rt].sum;
  }
  push_down(rt, tree[rt].r - tree[rt].l + 1);
  long long mid = (tree[rt].r + tree[rt].l) >> 1;
  long long ans = 0;
  if (L <= mid) ans += query_range(L, R, rt << 1);
  if (R > mid) ans += query_range(L, R, rt << 1 | 1);
  return ans;
}
inline long long query_min(long long L, long long R, long long rt) {
  if (L <= tree[rt].l && R >= tree[rt].r) {
    return tree[rt].minn;
  }
  push_down(rt, tree[rt].r - tree[rt].l + 1);
  long long mid = (tree[rt].r + tree[rt].l) >> 1;
  long long ans = (0x3f3f3f3f3f3f3f3fll);
  if (L <= mid) ans = min(ans, query_min(L, R, rt << 1));
  if (R > mid) ans = min(ans, query_min(L, R, rt << 1 | 1));
  return ans;
}
inline long long query_max(long long L, long long R, long long rt) {
  if (L <= tree[rt].l && R >= tree[rt].r) {
    return tree[rt].maxn;
  }
  push_down(rt, tree[rt].r - tree[rt].l + 1);
  long long mid = (tree[rt].r + tree[rt].l) >> 1;
  long long ans = -(0x3f3f3f3f3f3f3f3fll);
  if (L <= mid) ans = max(ans, query_max(L, R, rt << 1));
  if (R > mid) ans = max(ans, query_max(L, R, rt << 1 | 1));
  return ans;
}
const int N = 1e6 + 5;
int a[N];
double ans[N];
struct node {
  double ave;
  int l, r;
} stk[N];
int main() {
  int n;
  cin >> n;
  for (int i = 1; i <= n; i++) cin >> a[i];
  int top = 1;
  stk[top] = {(double)a[1], 1, 1};
  for (int i = 2; i <= n; i++) {
    stk[++top] = {(double)a[i], i, i};
    while (top > 1) {
      double temp = stk[top - 1].ave, ave = stk[top].ave;
      int pl = stk[top - 1].l, pr = stk[top - 1].r, l = stk[top].l,
          r = stk[top].r;
      double now = (double)(temp * (pr - pl + 1) + ave * (r - l + 1)) /
                   (double)(r - pl + 1);
      if (now <= temp) {
        top--;
        stk[top] = {now, pl, r};
      } else
        break;
    }
  }
  for (int i = 1; i <= top; i++) {
    for (int j = stk[i].l; j <= stk[i].r; j++) ans[j] = stk[i].ave;
  }
  for (int i = 1; i <= n; i++) printf("%.12lf\n", ans[i]);
  return 0;
}