16_E. Fish
n fish, numbered from 1 to n, live in a lake. Every day right one pair of fish meet, and the probability of each other pair meeting is the same. If two fish with indexes i and j meet, the first will eat up the second with the probability aij, and the second will eat up the first with the probability aji = 1 - aij. The described process goes on until there are at least two fish in the lake. For each fish find out the probability that it will survive to be the last in the lake.

Input

The first line contains integer n (1 ≤ n ≤ 18) — the amount of fish in the lake. Then there follow n lines with n real numbers each — matrix a. aij (0 ≤ aij ≤ 1) — the probability that fish with index i eats up fish with index j. It's guaranteed that the main diagonal contains zeros only, and for other elements the following is true: aij = 1 - aji. All real numbers are given with not more than 6 characters after the decimal point.

Output

Output n space-separated real numbers accurate to not less than 6 decimal places. Number with index i should be equal to the probability that fish with index i will survive to be the last in the lake.

Examples

Input

2
0 0.5
0.5 0


Output

0.500000 0.500000 

Input

5
0 1 1 1 1
0 0 0.5 0.5 0.5
0 0.5 0 0.5 0.5
0 0.5 0.5 0 0.5
0 0.5 0.5 0.5 0


Output

1.000000 0.000000 0.000000 0.000000 0.000000 
```python
# Author : nitish420 --------------------------------------------------------------------
import os
import sys
from io import BytesIO, IOBase
# sys.setrecursionlimit(10**4)

def main():
    n=int(input())
    prob=[]
    for _ in range(n):
        prob.append(list(map(float,input().split())))

    dp=[-1 for _ in range(1<<n)]

    ans=[0 for _ in range(n)]

    def move(mask,die):

        total=bin(mask).count('1')

        z=0

        for i in range(n):
            if mask & (1<<i):
                z+=prob[i][die]

        return z/((total*(total-1))>>1)


    def solve(mask):
        
        if mask==(1<<n)-1:
            return 1

        if dp[mask]!=-1:
            return dp[mask]

        ans=0
        for i in range(n):
            if not (mask & (1<<i)):
                prev=solve(mask ^ (1<<i))

                ans+=prev*move(mask ^ (1<<i),i)
        
        dp[mask]=ans
        return ans

        
    for i in range(n):
        ans[i]='%.6f'%solve(1<<i)
    
    print(*ans)



#----------------------------------------------------------------------------------------


# region fastio

BUFSIZE = 8192


class FastIO(IOBase):
    newlines = 0

    def __init__(self, file):
        self._fd = file.fileno()
        self.buffer = BytesIO()
        self.writable = 'x' in file.mode or 'r' not in file.mode
        self.write = self.buffer.write if self.writable else None

    def read(self):
        while True:
            b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
            if not b:
                break
            ptr = self.buffer.tell()
            self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr)
        self.newlines = 0
        return self.buffer.read()

    def readline(self):
        while self.newlines == 0:
            b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
            self.newlines = b.count(b'\n') + (not b)
            ptr = self.buffer.tell()
            self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr)
        self.newlines -= 1
        return self.buffer.readline()

    def flush(self):
        if self.writable:
            os.write(self._fd, self.buffer.getvalue())
            self.buffer.truncate(0), self.buffer.seek(0)


class IOWrapper(IOBase):
    def __init__(self, file):
        self.buffer = FastIO(file)
        self.flush = self.buffer.flush
        self.writable = self.buffer.writable
        self.write = lambda s: self.buffer.write(s.encode('ascii'))
        self.read = lambda: self.buffer.read().decode('ascii')
        self.readline = lambda: self.buffer.readline().decode('ascii')


sys.stdin, sys.stdout = IOWrapper(sys.stdin), IOWrapper(sys.stdout)
input = lambda: sys.stdin.readline().rstrip('\r\n')


# endregion

if __name__ == '__main__':
    main()
```