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 md = 1e9 + 7;
const int N = 1010000;
const int M = 5100;
const double eps = 1e-9;
struct node {
  double s;
  double lza, lzs;
  int l, r;
} bn[N * 4];
void buildtree(int k, int l, int r) {
  bn[k].l = l, bn[k].r = r;
  if (l == r) {
    bn[k].s = bn[k].lza = bn[k].lzs = 0;
    return;
  }
  int lk = k << 1, rk = lk + 1;
  int mid = (l + r) / 2;
  buildtree(lk, l, mid);
  buildtree(rk, mid + 1, r);
}
void pushdown(int k) {
  int lk = k << 1, rk = lk + 1;
  if (bn[k].lzs > 0) {
    bn[lk].lzs = bn[rk].lzs = 1;
    bn[lk].s = bn[rk].s = 0;
    bn[k].lza = bn[lk].lza = bn[rk].lza = 0;
  } else {
    bn[lk].lza += bn[k].lza;
    bn[rk].lza += bn[k].lza;
    bn[lk].s += bn[k].lza;
    bn[rk].s += bn[k].lza;
  }
  bn[k].lzs = bn[k].lza = 0;
}
double query(int k, int l) {
  if (bn[k].l == l && bn[k].r == l) {
    return bn[k].s;
  }
  if (bn[k].lzs > 0 || bn[k].lza > 0) pushdown(k);
  int lk = k << 1, rk = lk + 1;
  if (l <= bn[lk].r)
    return query(lk, l);
  else
    return query(rk, l);
}
void add(int k, int l, int r, int a) {
  if (bn[k].l == l && bn[k].r == r) {
    bn[k].lza += a;
    bn[k].s += a;
    return;
  }
  if (bn[k].lzs > 0 || bn[k].lza > 0) pushdown(k);
  int lk = k << 1, rk = lk + 1;
  if (r <= bn[lk].r)
    add(lk, l, r, a);
  else if (l >= bn[rk].l)
    add(rk, l, r, a);
  else {
    add(lk, l, bn[lk].r, a);
    add(rk, bn[rk].l, r, a);
  }
}
void set0(int k, int l, int r) {
  if (bn[k].l == l && bn[k].r == r) {
    bn[k].lzs = 1;
    bn[k].s = 0;
    return;
  }
  if (bn[k].lzs > 0 || bn[k].lza > 0) pushdown(k);
  int lk = k << 1, rk = lk + 1;
  if (r <= bn[lk].r)
    set0(lk, l, r);
  else if (l >= bn[rk].l)
    set0(rk, l, r);
  else {
    set0(lk, l, bn[lk].r);
    set0(rk, bn[rk].l, r);
  }
}
double an[N];
double ans[N];
double wn[N];
bool ok(int k, int id) {
  double sum = query(1, k);
  double avg = sum / (id - wn[k] + 1);
  return avg < ans[k] + eps;
}
int findk(int low, int high, int id) {
  if (low == high) return low;
  int mid = (low + high) / 2;
  if (ok(mid, id))
    return findk(low, mid, id);
  else
    return findk(mid + 1, high, id);
}
int main() {
  int n, m;
  int i, j, k;
  int u, v, w;
  int a, b, c, d;
  int z;
  cin >> n;
  for (i = 1; i <= n; i++) {
    int a;
    scanf("%d", &a);
    an[i] = a;
  }
  buildtree(1, 1, n);
  ans[0] = 0;
  int top = 0;
  for (i = 1; i <= n; i++) {
    if (an[i] > ans[top] + eps) {
      top++;
      ans[top] = an[i];
      wn[top] = i;
      add(1, 1, top, an[i]);
    } else {
      add(1, 1, top, an[i]);
      k = findk(1, top, i);
      double sum = query(1, k);
      double avg = sum / (i - wn[k] + 1);
      ans[k] = avg;
      if (k + 1 <= top) set0(1, k + 1, top);
      top = k;
    }
  }
  wn[top + 1] = n + 1;
  for (i = 1; i <= top; i++) {
    for (j = wn[i]; j < wn[i + 1]; j++) printf("%.10f\n", ans[i]);
  }
  return 0;
}