You are given N parallel computers which are arranged in a circle to compute a huge task. Each computer is continuously executing a program of computing the average of a given set of real numbers, where the \(i^{th}\) computer is given \(D[i]\) integers initially.
An erroneous input went to each of the computers. Due to this extra input, the \(i^{th}\) computer is now calculating the average of \(D[i]+1\) numbers. The extra input is actually the geometric mean of the output of two adjacent computers.
Write a program to find the result shown by each of the computers.
Input format
- First line: N
- Next N lines: Integer \(D[i]\) followed by \(D[i]\) space-separated integers (denoting the set of numbers given to each computer)
Output format
Print N space separated real numbers exactly upto 4 decimal places . Each integer being the result shown by that computers.
Note:
- The computers are running continuously.
- All computers are independently running their program.
- Circular arrangement means i and i+1 are adjacent where \(1\le i \le N-1\) ; 1 and N are adjacent.
Constraints
\(1 \le N \le 10^4 \)
\(1 \le D[i] \le 50 \)
\(1 \le actual\; input\; integers\; to\; i^{th}\; computer \le 1000 \)