#include <iostream>

using namespace std;

int main()
{
	int n;
	cin >> n;
	int **list = new int*[n];
	for (int i = 0; i < n; i++)
		list[i] = new int[2];
	for (int i = 0; i < n; i++) {
		cin >> list[i][0] >> list[i][1];
		if (list[i][0] != list[i][1]) {
			cout << "rated";
			return 0;
		}
	}

	int index = 0;
	while (index < n) {
		if (list[index][0] > list[1 + index][0]) {
			for (int i = index + 1; i < n; i++)
				if (list[i - 1][0] < list[i][0]) {
					cout << "unrated";
					return 0;
				}
			cout << "maybe";
			return 0;
		}
		else {
			for (int i = index + 1; i < n; i++)
				if (list[i - 1][0] > list[i][0]) {
					cout << "unrated";
					return 0;
				}
			cout << "maybe";
			return 0;
		}
	}
}


#include <iostream>

using namespace std;

int main()
{
	int n;
	cin >> n;
	int **list=new int*[n];
	for(int i=0;i<n;i++)
		list[i]=new int[2];
	for(int i=0;i<n;i++){
		cin >> list[i][0] >> list[i][1];
		if(list[i][0]!=list[i][1]){
			cout << "rated";
			return 0;
		}
	}
	if(list[0][0]>list[1][0]){
		for(int i=1;i<n;i++)
			if(list[i][0]<list[i+1][0]){
				cout << "unrated";
				return 0;
			}
	}
	else{
		for(int i=1;i<n;i++)
			if(list[i][0]>list[i+1][0]){
				cout << "unrated";
				return 0;
			}
	}
}


#include <iostream>

using namespace std;

int main()
{
	int n;
	cin >> n;
	int **list = new int*[n];
	for (int i = 0; i < n; i++)
		list[i] = new int[2];
	for (int i = 0; i < n; i++) {
		cin >> list[i][0] >> list[i][1];
		if (list[i][0] != list[i][1]) {
			cout << "rated";
			return 0;
		}
	}

	int index = 0;
	while (index < n) {
		if (list[index][0] > list[1 + index][0]) {
			for (int i = index + 1; i < n; i++)
				if (list[i - 1][0] < list[i][0]) {
					cout << "unrated";
					return 0;
				}
			cout << "maybe";
			return 0;
		}
		else
			if(list[index][0] < list[1 + index][0]){
				for (int i = index + 1; i < n; i++)
					if (list[i - 1][0] > list[i][0]) {
						cout << "unrated";
						return 0;
					}
				cout << "maybe";
				return 0;
		}
	}
}


#include <iostream>

using namespace std;

int main()
{
	int n;
	cin >> n;
	int **list = new int*[n];
	for (int i = 0; i < n; i++)
		list[i] = new int[2];
	for (int i = 0; i < n; i++) {
		cin >> list[i][0] >> list[i][1];
		if (list[i][0] != list[i][1]) {
			cout << "rated";
			return 0;
		}
	}

	int index = 0;
	while (index < n-1) {
		if (list[index][0] > list[1 + index][0]) {
			for (int i = index + 1; i < n; i++)
				if (list[i - 1][0] < list[i][0]) {
					cout << "unrated";
					return 0;
				}
			cout << "maybe";
			return 0;
		}
		else
			if(list[index][0] < list[1 + index][0]){
				for (int i = index + 1; i < n; i++)
					if (list[i - 1][0] > list[i][0]) {
						cout << "unrated";
						return 0;
					}
				cout << "maybe";
				return 0;
		}
		index++;
	}
		cout << "maybe";
			return 0;
}


#include <iostream>

using namespace std;

int main()
{
	int n;
	cin >> n;
	int **list = new int*[n];
	for (int i = 0; i < n; i++)
		list[i] = new int[2];
	for (int i = 0; i < n; i++) {
		cin >> list[i][0] >> list[i][1];
		if (list[i][0] != list[i][1]) {
			cout << "rated";
			return 0;
		}
	}

	int index = 0;
	while (index < n-1) {
		if (list[index][0] > list[1 + index][0]) {
			for (int i = index + 1; i < n; i++)
				if (list[i - 1][0] < list[i][0]) {
					cout << "unrated";
					return 0;
				}
			cout << "maybe";
			return 0;
		}
		else
			if(list[index][0] < list[1 + index][0]){
				{
					cout << "unrated";
					return 0;
				}
		}
		index++;
	}
		cout << "maybe";
			return 0;
}


#include <iostream>

using namespace std;

int main()
{
	int n;
	cin >> n;
	int **list = new int*[n];
	for (int i = 0; i<n; i++)
		list[i] = new int[2];
	for (int i = 0; i<n; i++) {
		cin >> list[i][0] >> list[i][1];
		if (list[i][0] != list[i][1]) {
			cout << "rated";
			return 0;
		}
	}
	if (list[0][0]>list[1][0]) {
		for (int i = 1; i<n; i++)
			if (list[i - 1][0]<list[i][0]) {
				cout << "unrated";
				return 0;
			}
		cout << "maybe";
		return 0;
	}
	else {
		for (int i = 1; i<n; i++)
			if (list[i - 1][0]>list[i][0]) {
				cout << "unrated";
				return 0;
			}
		cout << "maybe";
		return 0;
	}
}


#include <iostream>
#include <stdio.h>
#include <memory.h>
#include <algorithm>
#include <vector>
#include <cmath>
#include <bitset>
#include <string>
#include <cstring>
#include <iomanip>
#include <valarray>
#include <sstream>
#include <fstream>
#include <functional>
#include <utility>
#include <numeric>
#include <iterator>
#include <set>
#include <map>
#include <queue>
using namespace std;

typedef long long ll;
typedef unsigned long long ull;

#define sz(v) (int)v.size()
#define rsz(v,r) v.resize(r)
#define clr(v) v.clear()
#define vi vector<int>
#define ii pair<int, int>
#define vvi vector<vector<int>>
#define vb vector<bool>
#define vvb vector<vector<bool>>
#define vc vector<char>
#define vvc vector<vector <char> >
#define vs vector<string>
#define lop(i,n) for(int i=0; i<n; i++)
#define rlop(i,n) for(int i=n-1; i>=0; i--)
#define loop(i,start,n) for(int i=start; i<n; i++)
#define rloop(i,end,n) for(int i=n-1; i>=end; i--)
#define in(u) int u; cin>>u;
#define inc(u) char u; cin>>u;
#define ins(u) string u; cin>>u;
#define makeoutfile(out) ofstream out; out.open("text.txt", ios::out);
#define makeinfile(s) ifstream s; s.open("test.txt", ios::in);
int const diffli = 'a' - 'A';
int const oo = 2147483647;
int const loo = 1e18 + 9;

vi arr;
int binary(int val)
{
	int start = 0;
	int end = arr.size() - 1;
	while (start < end)
	{
		int mid = start + (end - start) / 2;
		if (arr[mid] < val)     start = mid + 1;
		else if (arr[mid] > val)    end = mid - 1;
		else  if (start == mid)     end = mid;
		else	start = mid;
	}
	return start;
}

int gcd(int u, int v)
{
	while (v != 0) {
		int r = u % v;
		u = v;
		v = r;
	}
	return u;
}

int main()
{
	in(n);
	int last;
	bool test = 0;
	in(u);
	in(v);
	last = u;
	if (u - v != 0)
	{
		cout << "rated";
		return 0;
	}
    n--;
	lop(i, n)
	{
		cin >> u >> v;
		if (u - v != 0)
		{
			cout << "rated";
			return 0;
		}
		if (u > last)
			test = 1;
		last=u;
	}
	if (test)
		cout << "unrated";
	else
		cout << "maybe";

}


#include <iostream>
using namespace std;
void main(){
	int n;
	cin>>n;
	int *arr=new int [n];
	int *arr2=new int [n];
	bool f=0;
	for (int i=0;i<n;i++)
	{
		cin>>arr[i]>>arr2[i];
		if (arr[i]!=arr2[i])
			f=1;
	}
	if (f)
		cout<<"rated";
	else {
		bool f2=0;
	for (int i=1;i<n;i++)
		if (arr[i-1]<arr[i])
		{
			f2=1;
			break;
		}

	if (f2)
		cout<<"unrated";
	else
		cout<<"maybe";

	}
}


#include<iostream>
#include<string>
#include<vector>
#include<algorithm>
#include<math.h>
using namespace std;
int main()
{

	int n;
	cin >> n;
	bool changed=false;
	bool may = true;
	int x, y;
	pair<int,int> max;
	vector<pair<int, int>>rating;
	for (int i = 0; i < n; i++)
	{
		cin >> x >> y;
		rating.push_back(make_pair(x, y));
		if (rating[i].first != rating[i].second)
		{
			changed = true;
		}
	}
	vector<pair<int, int>>sorted = rating;
	sort(sorted.begin(), sorted.end());
	if (!changed)
	{
		for (int i = 0; i < n ; i++)
		{
			if (rating[i].first != sorted[n-i-1].first)
			{
				may = false;
				break;
				/* 5
					3123 1699
					2777 2246
					2246 2246
					2246 2777
					1699 3123*/
			}
		}
		if (may)
			cout << "maybe" << "\n";
		else
			cout << "unrated" << "\n";
	}
	else
		cout << "rated" << "\n";
}


// 807A - Is It Rated?
#include <iostream>
#include <algorithm>

using namespace std;

int main()
{
	int n;
	int m = 4126;

	cin >> n;
	int a[n], b[n];

	for (int i = 0; i < n; i++)
	{
		cin >> a[i] >> b[i];
		if (a[i] != b[i])
			return cout << "rated", 0;
	}

	for (int i = 0; i < n; i++)
	{
		if (a[i] > m)
			return cout << "unrated", 0;
		m = min(a[i], m);
	}

	return cout << "maybe", 0;
}


#include <iostream>
#include <string>

using namespace std;

int n, a, b, m, j;
string s[3] = { "maybe", "unrated" , "rated" };

int main()
{

	cin >> n;

	for (int i = 0; i < n; i++)
	{
		cin >> a >> b;

		if (a != b)
		{
			j = 2;
			break;
		}

		if (i > 0 && a > m)
			j = 1;

		m = a;
	}

	cout << s[j];
	return 0;
}


// 807A - Is It Rated?
#include <iostream>
#include <algorithm>

using namespace std;

int main()
{
	int n, a, b, m = 4126;

	cin >> n;

	for (int i = 0; i < n; i++)
	{
		cin >> a >> b;
		if (a != b)
			return cout << "rated", 0;

		if (a > m)
			return cout << "unrated", 0;
		m = min(a, m);
	}

	return cout << "maybe", 0;
}


// 807A - Is It Rated?
#include <iostream>
#include <algorithm>

using namespace std;

int main()
{
	int n, a, b, m = 4126;

	cin >> n;

	for (int i = 0; i < n; i++)
	{
		cin >> a >> b;
		if (a != b)
			return cout << "rated", 0;
	}

	for (int i = 0; i < n; i++)
	{
		if (a > m)
			return cout << "unrated", 0;
		m = min(a, m);
	}

	return cout << "maybe", 0;
}


// 807A - Is It Rated?
#include <iostream>
#include <algorithm>

using namespace std;

int n;

int main()
{

	int m = 4126;

	cin >> n;
	int a[n], b[n];

	for (int i = 0; i < n; i++)
	{
		cin >> a[i] >> b[i];
		if (a[i] != b[i])
			return cout << "rated", 0;
	}

	for (int i = 0; i < n; i++)
	{
		if (a[i] > m)
			return cout << "unrated", 0;
		m = min(a[i], m);
	}

	return cout << "maybe", 0;
}


#include <iostream>
#include <string>

using namespace std;

int n, a, b, min, j;
string s[3] = { "maybe", "unrated" , "rated" };

int main()
{

	cin >> n;

	for (int i = 0; i < n; i++)
	{
		cin >> a >> b;

		if (a != b)
		{
			j = 2;
			break;
		}

		if (i > 0 && a > min)
			j = 1;

		min = a;
	}

	cout << s[j];
	return 0;
}


// 807A - Is It Rated?
#include <iostream>
#include <algorithm>

using namespace std;

int main()
{
	int n, *a, *b, m = 4126;

	cin >> n;
	a = new int[n];
	b = new int[n];

	for (int i = 0; i < n; i++)
	{
		cin >> a[i] >> b[i];
		if (a[i] != b[i])
			return cout << "rated", 0;
	}

	for (int i = 0; i < n; i++)
	{
		if (a[i] > m)
			return cout << "unrated", 0;
		m = min(a[i], m);
	}

	return cout << "maybe", 0;
}


// 807A - Is It Rated?
#include <iostream>
#include <algorithm>

using namespace std;

int main()
{
	int n, a, b, min = 4126;

	cin >> n;
	//a = new int[n];
	//b = new int[n];

	for (int i = 0; i < n; i++)
	{
		cin >> a >> b;
		if (a != b)
			return cout << "rated", 0;

		if (a > min)
			return cout << "unrated", 0;
		min = min(a, min);
	}

	return cout << "maybe", 0;
}


#include <iostream>
#include <string>

int n, a, b, min, j;
string s[3] = { "maybe", "unrated" , "rated" };

using namespace std;

int main()
{

	cin >> n;

	for (int i = 0; i < n; i++)
	{
		cin >> a >> b;

		if (a != b)
		{
			j = 2;
			break;
		}

		if (i > 0 && a > min)
			j = 1;

		min = a;
	}

	cout << s[j];
	return 0;
}


/*TEST*/

#include <iostream>
using namespace std;
int main ()
{
	int n;
	int a[1004][2];
	cin>>n;
	cin>>a[0][0]>>a[0][1];

		for(int i=1; i<n; i++)
		{
				cin>>a[i][0]>>a[i][1];
				if(a[i][0]!=a[i][1])
				{
					cout<<"rated";
					return 0;
				}
				if(a[i][0]>a[i-1][0])
				{
					cout<<"unrated";
					return 0;
				}
		}
		cout<<"maybe";
		return 0;
}


/*TEST*/

#include <iostream>
using namespace std;
int main ()
{
	int n;
	bool check=false;
	int a[1004][2];
	cin>>n;
	cin>>a[0][0]>>a[0][1];
	if(a[0][0]!=a[0][1])
		{
			cout<<"rated";
			return 0;
		}

		for(int i=1; i<n; i++)
		{
				cin>>a[i][0]>>a[i][1];
				if(a[i][0]!=a[i][1])
				{
					cout<<"rated";
					return 0;
				}
				if(a[i][0]>a[i-1][0])
				{
					check= true;
				}
		}
		if(check==true)
		{
			cout<<"unrated";
			return 0;
		}
		cout<<"maybe";
		return 0;
}


/*TEST*/

#include <iostream>
using namespace std;
int main ()
{
	int n;
	bool check=false;
	int a[1004][2];
	cin>>n;
	cin>>a[0][0]>>a[0][1];

		for(int i=1; i<n; i++)
		{
				cin>>a[i][0]>>a[i][1];
				if(a[i][0]!=a[i][1])
				{
					cout<<"rated";
					return 0;
				}
				if(a[i][0]>a[i-1][0])
				{
					check= true;
				}
		}
		if(check==true)
		{
			cout<<"unrated";
			return 0;
		}
		cout<<"maybe";
		return 0;
}


#include<iostream>
#include<algorithm>
#include<map>
#include<string>

using namespace std;
#define fo(a,b) for(int i = a;i<b;i++)
#define ll long long
#define N 1000

int main()
{
	int n;
	int a[N], b[N];
	cin >> n;
	for (int i = 0; i < n; i++)
	{
		cin >> a[i] >> b[i];
		if (a[i] != b[i])
			return cout << "rated", 0;
	}
	for (int i = 0; i < n-1; i++)
		if (a[i] < a[i + 1])
			cout << "unrated";
		else cout << "maybe";
	//system("pause");
}


#include<iostream>
#include<algorithm>
#include<map>
#include<string>

using namespace std;
#define fo(a,b) for(int i = a;i<b;i++)
#define ll long long
#define N 1000

int main()
{
	int n;
	int a[N], b[N];
	cin >> n;
	for (int i = 0; i < n; i++)
	{
		cin >> a[i] >> b[i];
		if (a[i] != b[i])
			return cout << "rated", 0;
	}
	for (int i = 0; i < n - 1; i++)
		if (a[i] < a[i + 1])
			return cout << "unrated", 0;
	cout << "maybe";
	//system("pause");
}


#define _CRT_SECURE_NO_DEPRECATE
#pragma comment(linker, "/STACK:1677721600")
#include <iostream>
#include <fstream>
#include <cstdio>
#include <stdio.h>
#include <cstdlib>
#include <stdlib.h>
#include <string>
#include <list>
#include <fstream>
#include <algorithm>
#include <cmath>
#include <map>
#include <vector>
#include <iomanip>
#include <queue>
#include <deque>
#include <set>
#include <stack>
#include <sstream>
#include <assert.h>
#include <functional>
#include <climits>
#include <cstring>

typedef long long ll;
typedef std::pair<ll, ll> pll;
typedef std::pair<int, int> pii;
#define ALL(x)           (x).begin(), (x).end()
#define forn(N)          for(int i = 0; i<(int)N; i++)
#define fornj(N)         for(int j = 0; j<(int)N; j++)
#define fornk(N)         for(int k = 0; k<(int)N; k++)
#define forn1(N)          for(int i = 1; i<=(int)N; i++)
#define fornj1(N)         for(int j = 1; j<=(int)N; j++)
#define fornk1(N)         for(int k = 1; k<=(int)N; k++)
#define PI 3.1415926535897932384626433
#define LINF (1LL<<60)
#define INF (1<<30)
#define v vector
#define File "Patterns"

#define isOn(S, j) (S & (1 << j))
#define setBit(S, j) (S |= (1 << j))
#define clearBit(S, j) (S &= ~(1 << j))
#define toggleBit(S, j) (S ^= (1 << j))
#define lowBit(S) (S & (-S))
#define setAll(S, n) (S = (1 << n) - 1)

#define log2BitApproximate(S) ((int)(log((double)S) / log(2.0)))
#define log2Bit(S) (1 << (log2BitApproximate(S) + 1) > S ? log2BitApproximate(S) : log2BitApproximate(S) + 1)
#define highBit(S) (isPowerOfTwo(S) ? S : 1 << log2Bit(S))

#define modulo(S, N) ((S) & (N - 1))   // returns S % N, where N is a power of 2
#define isPowerOfTwo(S) (!(S & (S - 1)))
#define nearestPowerOfTwo(S) ((int)pow(2.0, (int)((log((double)S) / log(2.0)) + 0.5)))
#define turnOffLastBit(S) ((S) & (S - 1))
#define turnOnLastZero(S) ((S) | (S + 1))
#define turnOffLastConsecutiveBits(S) ((S) & (S + 1))
#define turnOnLastConsecutiveZeroes(S) ((S) | (S - 1))

#define print(n) printf("%d ", (n));
#define printll(n) printf("%I64d ", (n));
#define printline() printf("\n");

#define read(n) scanf("%d", &n);
#define read2(n, m) scanf("%d%d", &n, &m);
#define readll(n) scanf("%I64d", &n);
using namespace std;

const int maxn = 1 << 18;

int n;

double a[20][20];
double prob[maxn];

double find(int x) {
	if (prob[x] > -0.5)return prob[x];
	prob[x] = 0;
	int bitcount = 1;
	forn(n)if (x & 1 << i)bitcount++;
	forn(n)fornj(n) {
		if (((x & 1 << i) != 0) && ((x & 1 << j) == 0)) {
			prob[x] += find(x | 1 << j) * a[i][j]/(bitcount*(bitcount-1)/2);
		}

	}
	return prob[x];

}

int main()
{
#if defined(_DEBUG) || defined(_RELEASE)
	freopen("input.txt", "r", stdin); freopen("output.txt", "w", stdout);
#else
	//freopen(File".in", "r", stdin); freopen(File".out", "w", stdout);
#endif
	cin >> n;

	forn(n)fornj(n)cin >> a[i][j];
	forn(maxn)prob[i] = -1;
	prob[(1<<n)-1] = 1;
	forn(n)cout << fixed << setprecision(10) << find(1 << i) << " ";

	return 0;
}


#pragma comment(linker, "/STACK:836777216")

#include <algorithm>
#include <iostream>
#include<stdio.h>
#include<complex>
#include <string>
#include<sstream>
#include<string.h>
#include <vector>
#include <bitset>
#include <cmath>
#include <queue>
#include<stack>
#include <set>
#include <map>
#include<ctime>
#include<memory.h>

using namespace std;

typedef long long ll;
typedef vector<int> vi;
typedef pair<int,int> pii;
typedef pair<double,double> pdd;
typedef pair<pii,int> p3i;
typedef long double ld;
typedef vector<ld> vd;

#define FOR(i,a,b) for (int i(a); i < (b); i++)
#define REP(i,n) FOR(i,0,n)
#define UN(v) sort((v).begin(),(v).end()),v.erase(unique(v.begin(),v.end()),v.end())
#define CL(a,b) memset(a,b,sizeof(a))
#define pb push_back
#define SORT(a) sort((a).begin(),(a).end())

double a[20][20];
int n;
double r[1<<18][20];

int main(){
#ifdef LocalHost
    freopen("input.txt","r",stdin);
    //freopen("output.txt","w",stdout);
#endif

	cin>>n;
	REP(i,n) REP(j,n) cin>>a[i][j];

	FOR(i,1,1<<n){
		if(i&(i-1)){
			int num = 0;
			REP(j,n)if(i&(1<<j)) num++;
			num *= (num-1); num /= 2;

			REP(j,n)if(i&(1<<j))
				FOR(k,j+1,n)if(i&(1<<k)){
					REP(q,n) r[i][q] += a[j][k] * r[i^(1<<k)][q], r[i][q] += a[k][j] * r[i^(1<<j)][q];
				}

			REP(j,n) r[i][j] /= num;
		}else{
			REP(j,n)if(i&(1<<j)) r[i][j]=1;
		}
	}
	REP(i,n){
		if(i) printf(" ");
		printf("%.6lf",r[(1<<n)-1][i]);
	}
	puts("");
	return 0;
}


#include <stdio.h>
#include <iostream>
#include <cstring>
#include <string>
#include <algorithm>
#include <set>
#include <map>
#include <vector>
#include <queue>
#include <stack>
#include <cmath>

using namespace std;

double a[20][20];
double dp[262154];
int mask;
int h;
int b;

int main()
{
	int n;
	scanf("%d",&n);
	b=1<<n;
	for(int i=0;i<n;i++)
	{
		for(int j=0;j<n;j++)
		{
			scanf("%lf",&a[i][j]);
		}
	}

	dp[0]=1;

	int cnt;
	for(int i=0;i<b;i++)
	{
		mask=i;
		cnt=0;
		for(int j=0;j<n;j++)
		{
			if(!(mask&(1<<j)))
			{
				cnt++;
			}
		}

		cnt*=cnt-1;
		cnt/=2;

		for(int j=0;j<n;j++)
		{
			if(!(mask&(1<<j)))
			{
				for(int k=0;k<n;k++)
				{
					if(j!=k)
					{
						if(!(mask&(1<<k)))
						{
							h=mask|(1<<j);
							dp[mask|(1<<j)]+=1.0/((double)cnt)*a[k][j]*dp[i];
							//dp[mask|(1<<k)]+=1.0/((double)cnt-1)*a[j][k];
						}
					}//if(j!=k)
				}//for(int k=0;k<n;k++)
			}
		}//for(int j=0;j<n;j++)
	}//for(int i=0;i<b;i++)

	for(int i=0;i<n;i++)
	{
		int h=(b-1)^(1<<(i));
		double temp=dp[h];
		printf("%.6lf ",temp);
	}
	return 0;
}


#define _CRT_SECURE_NO_WARNINGS
#include <iostream>
#include <algorithm>
#include <stdio.h>
#include <string.h>
#include <string>
#include <vector>
#include <set>
#include <map>
#include <math.h>
#include <stdlib.h>
#include <time.h>
#pragma comment (linker,"/STACK:16000000")
using namespace std;
const int maxn = 25;
double p[maxn][maxn]={0};
double q[maxn][maxn]={0};
double res[maxn]={0};
double d[1 << 19]={0};
int two[1 << 19]={1};
int cnk[20][20]={{1},{1,1}};
int bc[1 << 19];
int abc[1 << 19];
int main()
{
   // freopen("input.txt","r",stdin);
   // freopen("output.txt","w",stdout);
    int n,i,j,k;
    cin >> n;
    for (i=0;i<n;i++)
    {
        for (j=0;j<n;j++)
        {
            cin >> p[i][j];
            q[i][j] = 1 - p[i][j];
        }
    }
    for (i=1;i<=n;i++)
        two[i] = two[i-1] << 1;

    abc[0] = n;
    for (i=1;i<two[n];i++){
        bc[i] = bc[i >> 1] + (i % 2);
        abc[i] = n - bc[i];
    }

    for (i=2;i<=n;i++){
        cnk[i][0] = 1;
        for (j=i;j>=1;j--)
            cnk[i][j] = cnk[i-1][j] + cnk[i-1][j-1];
    }

    d[0] = 1;
    for (i=0;i<two[n];++i)
    {
        for (j=0;j<n;++j)
        {
            if (!(i & two[j]))
            {
                for (k=0;k<n;++k)
                {
                    if (k==j)
                        continue;
                    if (!(i & two[k]))
                    {
                        d[i ^ two[k]] += d[i] * p[j][k] * 2.0  / (abc[i] * (abc[i] - 1));
                        if (d[i ^ two[k]]>1.0)
                        {
                            k = k;
                        }

                    }
                }
            }
        }
    }

    int msk = two[n] - 1;
    for (i=0;i<n;i++)
    {
        printf("%.15lf ",d[msk ^ two[i]]);
    }

    return 0;
}


#include <iostream>
#include <iomanip>

using namespace std;

int n;
double a[18][18], p[1<<18];

void solve()
{
	p[(1<<n)-1] = 1;
	for (int mask = (1<<n)-1; mask > 0; --mask)
	{
		int nl = 0, il[18];
		for (int i = 0; i < n; ++i) if (mask & (1<<i)) il[nl++] = i;
		double ppair = 2.0 / nl / (nl-1.0);

		for (int f1 = 0; f1 < nl; ++f1)
			for (int f2 = f1+1; f2 < nl; ++f2)
			{
				p[mask ^ (1<<il[f2])] += ppair * p[mask] * a[il[f1]][il[f2]];
				p[mask ^ (1<<il[f1])] += ppair * p[mask] * (1-a[il[f1]][il[f2]]);
			}
	}

	for (int i = 0; i < n; ++i)
		cout << setiosflags(ios::fixed) << setprecision(8) << p[1<<i] << " ";
}

int main()
{
	cin >> n;
	for (int i = 0; i < n; ++i)
		for (int j = 0; j < n; ++j)
			cin >> a[i][j];

	solve();

	return 0;
}


#include <iostream>
#include <vector>
#include <algorithm>
#include <iomanip>
using namespace std;

int bit(int i)
{
    return 1 << i;
}
bool is_bit_set(int n, int i)
{
    return (n & bit(i)) != 0;
}

void set_bit(int& n, int i)
{
    n |= bit(i);
}

int main()
{
    cout << setiosflags(ios::fixed | ios::showpoint) << setprecision(9);
    int n; cin >> n;
    vector<vector<double> > a(n, vector<double>(n));
    for(int i = 0; i < n; ++i)
        for(int j = 0; j < n; ++j)
            cin >> a[i][j];
    const int scenario_count = 1 << n;
    vector<vector <double> > p(n, vector<double>(scenario_count));
    p[0][scenario_count-1] = 1.0;
    vector<int> permutation(n, 1);
    for(int i = 1; i < n; ++i)
    {
        permutation[i-1] = 0;
        do
        {
            int current_permutation = 0;
            for(int j = n-1; j >= 0; --j)
            {
                current_permutation *= 2;
                current_permutation += permutation[j];
            }

            //count the probablity of getting into current_permutation configuration on ith day
            //p[i][current_permutation]
            for(int j = 0; j < n; ++j)
            {
                if(permutation[j] == 0)
                {
                    //we could have come from the configuration with jth bit set
                    int previous_permutation = current_permutation;
                    set_bit(previous_permutation, j);

                    double probabilty_that_jth_fish_was_eaten = 0.0;
                    for(int k = 0; k < n; ++k)
                        if(permutation[k] == 1)
                            probabilty_that_jth_fish_was_eaten += a[k][j];
                    probabilty_that_jth_fish_was_eaten /= (n - i + 1)*(n - i)/2.0;
                    p[i][current_permutation] += p[i-1][previous_permutation] * probabilty_that_jth_fish_was_eaten;
                }
            }
        }while(next_permutation(permutation.begin(), permutation.end()));
    }

    for(int i = 0; i < n; ++i)
    {
        cout << p[n-1][bit(i)] << " ";
    }
}


#include "cstdio"
using namespace std;
typedef long long i64;

double p[18][18];
double dp[1 << 18][18];

int main() {
  int n; scanf("%d", &n);
  const int all = (1 << n) - 1;
  for (int i = 0; i < n; ++i) for (int j = 0; j < n; ++j) scanf("%lf", &p[i][j]);
  for (int i = 0; i < n; ++i) dp[0][i] = 0.0;
  for (int i = 0; i < n; ++i) for (int j = 0; j < n; ++j) dp[1 << i][j] = i == j ? 1.0 : 0.0;
  for (int mask = 3; mask <= all; ++mask) if (mask & (mask - 1)) {
    for (int i = 0; i < n; ++i) dp[mask][i] = 0.0;
    int count = 0;
    for (int a = 0; a < n - 1; ++a) if (mask & (1 << a))
      for (int b = a + 1; b < n; ++b) if (mask & (1 << b)) {
        ++count;
        for (int i = 0; i < n; ++i)
          dp[mask][i] += dp[mask & ~(1 << b)][i] * p[a][b] +
                         dp[mask & ~(1 << a)][i] * (1 - p[a][b]);
      }
    for (int i = 0; i < n; ++i) dp[mask][i] /= count;
  }
  printf("%.6lf", dp[all][0]);
  for (int i = 1; i < n; ++i)
    printf(" %6lf", dp[all][i]);
  printf("\n");
  return 0;
}


/*
DEATH-MATCH
Davit-Marg
*/
#include <iostream>
#include <algorithm>
#include <cmath>
#include <vector>
#include <string>
#include <cstring>
#include <map>
#include <set>
#include <queue>
#include <deque>
#include <stack>
#include <iterator>
#include <ctype.h>
#include <stdlib.h>
#include <fstream>
#define mod 1000000007ll;
#define LL long long
#define LD long double
#define MP make_pair
#define PB push_back
using namespace std;

int n;
LD p[20][20],dp[(1<<18)+10];

int main()
{
	cin >> n;
	for (int i = 0; i < n; i++)
		for (int j = 0; j < n; j++)
			cin >> p[i][j];
	dp[(1 << n) - 1] = 1;

	for (int mask = (1 << n) - 1; mask > 0; mask--)
	{
		for (int i = 0; i < n; i++)
		{
			if (mask & (1 << i) == 0)
				continue;
			LD hav = 0, q = 0;
			for (int j = 0; j < n; j++)
				if (mask & (1 << j))
						q++;
			if (q == 1)
				continue;
			q = 2.0 / q / (q - 1);
			for (int j = i+1; j < n; j++)
				{
					if (!(mask & (1 << i))) continue;
					if (!(mask & (1 << j))) continue;

					dp[mask^(1<<j)] += dp[mask] * q * p[i][j];
					dp[mask^(1<<i)] += dp[mask] * q * p[j][i];
				}
		}
	}
	for (int i = 0; i < n; i++)
		printf("%.8f ",dp[(1 << i)]);
	cout << endl;
	return 0;
}


#include <stdio.h>
#include <iostream>
#include <algorithm>
#include <vector>
#include <string>
#include <queue>
#include <map>
#include <set>
#include <cmath>
#include <sstream>
#include <stack>
#include <cassert>

#define pb push_back
#define mp make_pair
#define PI 3.1415926535897932384626433832795
#define sqr(x) (x)*(x)
#define forn(i, n) for(int i = 0; i < n; ++i)
#define ALL(x) x.begin(), x.end()
#define sz(x) int((x).size())
#define X first
#define Y second
typedef long long ll;
typedef unsigned long long ull;
typedef long double ld;
using namespace std;
typedef pair<int,int> pii;
const int INF = 2147483647;
const ll LLINF = 9223372036854775807LL;
double a[20][20];
double dp[(1<<18)+10] = {};
int main()
{
#ifndef ONLINE_JUDGE
	freopen("input.txt", "r", stdin);
	//freopen("output.txt", "w", stdout);
#endif
	int n; scanf("%d", &n);
	for (int i = 0; i < n; ++i) for (int j = 0; j < n; ++j) scanf("%lf", &a[i][j]);
	dp[(1<<n)-1]=1;

	for (int i = (1<<n)-1; i > 0; --i) {
		int cc = 0;
		for (int j = 0; j < n; ++j) if (i&(1<<j)) cc++;
		double div = 1./(cc*(cc-1)/2);
		for (int j = 0; j < n; ++j) {
			if (!(i&(1<<j))) continue;
			for (int k = j+1; k < n; ++k) {
				if (!(i&(1<<k))) continue;
				dp[i&~(1<<k)]+=dp[i]*div*a[j][k];
				dp[i&~(1<<j)]+=dp[i]*div*a[k][j];
			}
		}
	}
	for (int i = 0; i < n; ++i) printf("%.15lf ", dp[1<<i]);
	return 0;
}


#include <iostream>
#include <cmath>
#include <string>
#include <algorithm>
#include <vector>
#include <queue>

using namespace std;

const int MN = 18;

double dp[(1 << MN) + 10];

double arr[MN][MN];

int n;

bool is_set(int mask, int k) {
	return (mask & (1 << k));
}

void to_set(int &mask, int k) {
	mask |= (1 << k);
}

int cnt(int mask) {
	int s = 0;
	for(int i = 0; i < n; i ++)
		if (is_set(mask, i))
			s ++;
	return s;
}

int main() {
	/*freopen("input.txt", "r", stdin);
	freopen("output.txt", "w", stdout);*/
	cin >> n;
	for(int i = 0; i < n; i ++)
		for(int j = 0; j < n; j ++)
			cin >> arr[i][j];
	int mask = (1 << n) - 1;
	dp[mask] = 1.0;
	while (mask) {
		int k = cnt(mask);
		if (k < 2) {
			mask --;
			continue;
		}
		for(int i = 0; i < n; i ++) {
			for(int j = 0; j < n; j ++) {
				if (i == j)
					continue;
				if (!is_set(mask, i) || !is_set(mask, j))
					continue;
				int msk = mask ^ (1 << j);
				dp[msk] += dp[mask] * (2.0 / k / (k - 1.0)) * arr[i][j];
			}
		}
		mask --;
	}
	for(int i = 0; i < n; i ++)
		printf("%0.10lf ", dp[1 << i]);
	return 0;
}


#pragma comment(linker,"/STACK:64000000")
#define _CRT_SECURE_NO_WARNINGS
#include <stdio.h>
#include <iostream>
#include <vector>
#include <string>
#include <algorithm>
#include <map>
#include <set>
#include <sstream>
#include <cmath>
#include <ctime>
#include <memory.h>

#define WR printf
#define RE scanf
#define PB push_back
#define SE second
#define FI first
#define MP make_pair

#define FOR(i,Be,En) for(int (i)=(Be);(i)<=(En);++(i))
#define DFOR(i,Be,En) for(int (i)=(Be);(i)>=(En);--(i))
#define SZ(a) (int)((a).size())
#define FA(i,v) FOR(i,0,SZ(v)-1)
#define RFA(i,v) DFOR(i,SZ(v)-1,0)
#define CLR(a) memset(a,0,sizeof(a))

#define LL  long long
#define VI  vector<int>
#define PAR pair<int ,int>

using namespace std;
void __never(int a){printf("\nOPS %d", a);}
void __die(int a){printf("%d",(a*a)/(a+a));}
#define ass(s) {if (!(s)) {__never(__LINE__);cout.flush();cerr.flush();__die(0);}}

double a[20][20];
double dp[1<<19];

int n;
int m[20];
void init()
{
    freopen("input.txt","r",stdin);
    freopen("output.txt","w",stdout);
}
void sol(){
    cin >> n;
    FOR(i,0,n-1) FOR(j,0,n-1) cin >> a[i][j];

    dp[(1<<n)-1] = 1.;
    DFOR(I,(1<<n)-1,0) {
        int cc = 0;
        FOR(i,0,n-1) if (I & (1<<i)) m[cc++] = i;
        if (cc <= 1) continue;
        double c = 2. / (cc * (cc - 1));
        FOR(i,0,cc-1) FOR(j,0,cc-1) if (i != j) {
            dp[I - (1<<m[j])] += dp[I] * c * a[m[i]][m[j]];
        }
    }
    FOR(i,0,n-1) WR(" %.6lf",dp[1<<i]);
}
int main()
{
   // init();
    sol();
    return 0;
}


#include<cstdio>
#include<vector>
#include<string>
#include<climits>
#include<cstdlib>
#include<string.h>
#include<iostream>
#include<algorithm>
#define LL long long
#define _max(a, b) ((a) > (b) ? (a) : (b))
#define _min(a, b) ((a) < (b) ? (a) : (b))
using namespace std;

double f[300000], p[22][22];
int n, a[22];
int main()
{
	cin>> n;
	for (int i = 1; i <= n; i++)
		for (int j = 1; j <= n; j++)
			cin>> p[i][j];
	int m = (1 << n) - 1;
	f[m] = 1;
	for (int mask = m; mask; mask--)
	{
		int k = 0;
		for (int i = 1; i <= n; i++)
			if (mask & (1 << (i - 1)))
				a[++k] = i;
		int all = (k - 1) * k / 2;
		for (int i = 1; i < k; i++)
			for (int j = i + 1; j <= k; j++)
			{
				f[mask - (1 << (a[i] - 1))] += f[mask] * p[a[j]][a[i]] / all;
				f[mask - (1 << (a[j] - 1))] += f[mask] * p[a[i]][a[j]] / all;
			}
	}
	cout.precision(13);
	for (int i = 0; i < n; i++) cout<< fixed<< f[1 << i]<< " ";
	return 0;
}


#ifdef _MSC_VER
#pragma warning(disable:4996)  // deprecations
#endif  //  #ifdef _MSC_VER
#include <functional>
#include <algorithm>
#include <iostream>
#include <numeric>
#include <utility>
#include <sstream>
#include <complex>
#include <limits>
#include <string>
#include <bitset>
#include <vector>
#include <queue>
#include <stack>
#include <list>
#include <map>
#include <set>
#include <stdlib.h>
#include <assert.h>
#include <stdarg.h>
#include <string.h>
#include <ctype.h>
#include <stdio.h>
#include <float.h>
#include <math.h>
#include <time.h>
using namespace std;

////////////////////// Debug Utilities ///////////////////////
void dprintf(char* format, ...) {
  fprintf(stderr, "DEBUG: ");
  va_list argp; va_start(argp, format);
  vfprintf(stderr, format, argp); va_end(argp);
  fprintf(stderr, "\n");
}
////////////////////// Debug Utilities ///////////////////////

////////////////////// Reading Utilities ///////////////////////
static char stringReader[2097152];
static inline bool ReadLine() {
  char* ptr = fgets(stringReader, sizeof(stringReader), stdin);
  if ( ptr == 0 ) return false;
  int N = strlen(stringReader);
  if ( stringReader[N - 1] == '\n' ) stringReader[N - 1] = 0;
  return true;
}
#define InLine(X) string X; ReadLine(); X = stringReader
#define InString1(X) string X; scanf("%s", stringReader); X = stringReader
#define InString2(X, Y) string X, Y; scanf("%s", stringReader); X = stringReader; scanf("%s", stringReader); Y = stringReader
#define InString3(X, Y, Z) string X, Y, Z; scanf("%s", stringReader); X = stringReader; scanf("%s", stringReader); Y = stringReader; scanf("%s", stringReader); Z = stringReader
#define InString4(X, Y, Z) string X, Y, Z, W; scanf("%s", stringReader); X = stringReader; scanf("%s", stringReader); Y = stringReader; scanf("%s", stringReader); Z = stringReader; scanf("%s", stringReader); W = stringReader
#define InDouble1(X) double X; scanf("%lf", &X)
#define InDouble2(X, Y) double X, Y; scanf("%lf%lf", &X, &Y)
#define InDouble3(X, Y, Z) double X, Y, Z; scanf("%lf%lf%lf", &X, &Y, &Z)
#define InDouble4(X, Y, Z, W) double X, Y, Z, W; scanf("%lf%lf%lf%lf", &X, &Y, &Z, &W)
#define InI641(X) i64 X; scanf("%lld", &X)
#define InI642(X, Y) i64 X, Y; scanf("%lld%lld", &X, &Y)
#define InI643(X, Y, Z) i64 X, Y, Z; scanf("%lld%lld%lld", &X, &Y, &Z)
#define InI644(X, Y, Z, W) i64 X, Y, Z, W; scanf("%lld%lld%lld%lld", &X, &Y, &Z, &W)
#define InInt1(X) int X; scanf("%d", &X)
#define InInt2(X, Y) int X, Y; scanf("%d%d", &X, &Y)
#define InInt3(X, Y, Z) int X, Y, Z; scanf("%d%d%d", &X, &Y, &Z)
#define InInt4(X, Y, Z, W) int X, Y, Z, W; scanf("%d%d%d%d", &X, &Y, &Z, &W)
#define InGlobalLine(X) ReadLine(); X = stringReader
#define InGlobalString1(X) scanf("%s", stringReader); X = stringReader
#define InGlobalString2(X, Y) scanf("%s", stringReader); X = stringReader; scanf("%s", stringReader); Y = stringReader
#define InGlobalString3(X, Y, Z) scanf("%s", stringReader); X = stringReader; scanf("%s", stringReader); Y = stringReader; scanf("%s", stringReader); Z = stringReader
#define InGlobalString4(X, Y, Z, W) scanf("%s", stringReader); X = stringReader; scanf("%s", stringReader); Y = stringReader; scanf("%s", stringReader); Z = stringReader; scanf("%s", stringReader); W = stringReader
#define InGlobalDouble1(X) scanf("%lf", &X)
#define InGlobalDouble2(X, Y) scanf("%lf%lf", &X, &Y)
#define InGlobalDouble3(X, Y, Z) scanf("%lf%lf%lf", &X, &Y, &Z)
#define InGlobalDouble4(X, Y, Z, W) scanf("%lf%lf%lf%lf", &X, &Y, &Z, &W)
#define InGlobalI641(X) scanf("%lld", &X)
#define InGlobalI642(X, Y) scanf("%lld%lld", &X, &Y)
#define InGlobalI643(X, Y, Z) scanf("%lld%lld%lld", &X, &Y, &Z)
#define InGlobalI644(X, Y, Z, W) scanf("%lld%lld%lld%lld", &X, &Y, &Z, &W)
#define InGlobalInt1(X) scanf("%d", &X)
#define InGlobalInt2(X, Y) scanf("%d%d", &X, &Y)
#define InGlobalInt3(X, Y, Z) scanf("%d%d%d", &X, &Y, &Z)
#define InGlobalInt4(X, Y, Z, W) scanf("%d%d%d%d", &X, &Y, &Z, &W)
#define InVectorLine(X, N) vector<string> X(N); for ( int i_##X = 0; i_##X < N; ++i_##X ) ReadLine(), X[i_##X] = stringReader;
#define InVectorString(X, N) vector<string> X(N); for ( int i_##X = 0; i_##X < N; ++i_##X ) scanf("%s", stringReader), X[i_##X] = stringReader
#define InVectorDouble(X, N) vector<double> X(N); for ( int i_##X = 0; i_##X < N; ++i_##X ) scanf("%lf", &X[i_##X])
#define InVectorI64(X, N) vector<i64> X(N); for ( int i_##X = 0; i_##X < N; ++i_##X ) scanf("%lld", &X[i_##X])
#define InVectorInt(X, N) vector<int> X(N); for ( int i_##X = 0; i_##X < N; ++i_##X ) scanf("%d", &X[i_##X])
#define InVectorGlobalLine(X, N) X.assign(N, ""); for ( int i_##X = 0; i_##X < N; ++i_##X ) ReadLine(), X[i_##X] = stringReader;
#define InVectorGlobalString(X, N) X.assign(N, ""); for ( int i_##X = 0; i_##X < N; ++i_##X ) scanf("%s", stringReader), X[i_##X] = stringReader
#define InVectorGlobalDouble(X, N) X.assign(N, 0); for ( int i_##X = 0; i_##X < N; ++i_##X ) scanf("%lf", &X[i_##X])
#define InVectorGlobalI64(X, N) X.assign(N, 0); for ( int i_##X = 0; i_##X < N; ++i_##X ) scanf("%lld", &X[i_##X])
#define InVectorGlobalInt(X, N) X.assign(N, 0); for ( int i_##X = 0; i_##X < N; ++i_##X ) scanf("%d", &X[i_##X])
#define InArrayLine(X, N, MAX_N) string X[MAX_N]; for ( int i_##X = 0; i_##X < N; ++i_##X ) ReadLine(), X[i_##X] = stringReader;
#define InArrayString(X, N, MAX_N) string X[MAX_N]; for ( int i_##X = 0; i_##X < N; ++i_##X ) scanf("%s", stringReader), X[i_##X] = stringReader
#define InArrayDouble(X, N, MAX_N) double X[MAX_N]; for ( int i_##X = 0; i_##X < N; ++i_##X ) scanf("%lf", &X[i_##X])
#define InArrayI64(X, N, MAX_N) i64 X[MAX_N]; for ( int i_##X = 0; i_##X < N; ++i_##X ) scanf("%lld", &X[i_##X])
#define InArrayInt(X, N, MAX_N) int X[MAX_N]; for ( int i_##X = 0; i_##X < N; ++i_##X ) scanf("%d", &X[i_##X])
#define InArrayLineGlobal(X, N) for ( int i_##X = 0; i_##X < N; ++i_##X ) ReadLine(), X[i_##X] = stringReader;
#define InArrayStringGlobal(X, N) for ( int i_##X = 0; i_##X < N; ++i_##X ) scanf("%s", stringReader), X[i_##X] = stringReader
#define InArrayDoubleGlobal(X, N) for ( int i_##X = 0; i_##X < N; ++i_##X ) scanf("%lf", &X[i_##X])
#define InArrayI64Global(X, N) for ( int i_##X = 0; i_##X < N; ++i_##X ) scanf("%lld", &X[i_##X])
#define InArrayIntGlobal(X, N) for ( int i_##X = 0; i_##X < N; ++i_##X ) scanf("%d", &X[i_##X])
#define WhileTests() int TOTAL_TEST_CASES; ReadLine(); sscanf(stringReader, "%d", &TOTAL_TEST_CASES); for ( int current_test_case = 1; current_test_case <= TOTAL_TEST_CASES; ++current_test_case )
#define WhileInString(X) int current_test_case = 1; for ( string X; scanf("%s", &X) == 1 && (X != ""); ++current_test_case )
#define WhileInI641(X) int current_test_case = 1; for ( i64 X; scanf("%lld", &X) == 1 && (X); ++current_test_case )
#define WhileInI642(X, Y) int current_test_case = 1; for ( i64 X, Y, current_test_case = 1; scanf("%lld%lld", &X, &Y) == 2 && (X|Y); ++current_test_case )
#define WhileInI643(X, Y, Z) int current_test_case = 1; for ( i64 X, Y, Z, current_test_case = 1; scanf("%lld%lld%lld", &X, &Y, &Z) == 3 && (X|Y|Z); ++current_test_case )
#define WhileInInt1(X) for ( int X, current_test_case = 1; scanf("%d", &X) == 1 && (X); ++current_test_case )
#define WhileInInt2(X, Y) for ( int X, Y, current_test_case = 1; scanf("%d%d", &X, &Y) == 2 && (X|Y); ++current_test_case )
#define WhileInInt3(X, Y, Z) for ( int X, Y, Z, current_test_case = 1; scanf("%d%d%d", &X, &Y, &Z) == 3 && (X|Y|Z); ++current_test_case )
#define WhileInGlobalI641(X) for ( int current_test_case = 1; scanf("%lld", &X) == 1 && (X); ++current_test_case )
#define WhileInGlobalI642(X, Y) for ( int current_test_case = 1; scanf("%lld%lld", &X, &Y) == 2 && (X|Y); ++current_test_case )
#define WhileInGlobalI643(X, Y, Z) for ( int current_test_case = 1; scanf("%lld%lld%lld", &X, &Y, &Z) == 3 && (X|Y|Z); ++current_test_case )
#define WhileInGlobalInt1(X) for ( int current_test_case = 1; scanf("%d", &X) == 1 && (X); ++current_test_case )
#define WhileInGlobalInt2(X, Y) for ( int current_test_case = 1; scanf("%d%d", &X, &Y) == 2 && (X|Y); ++current_test_case )
#define WhileInGlobalInt3(X, Y, Z) for ( int current_test_case = 1; scanf("%d%d%d", &X, &Y, &Z) == 3 && (X|Y|Z); ++current_test_case )
#define WhileInStringEOF(X) int current_test_case = 1; for ( string X; scanf("%s", &X) == 1; ++current_test_case )
#define WhileInI641EOF(X) int current_test_case = 1; for ( i64 X; scanf("%lld", &X) == 1; ++current_test_case )
#define WhileInI642EOF(X, Y) int current_test_case = 1; for ( i64 X, Y, current_test_case = 1; scanf("%lld%lld", &X, &Y) == 2; ++current_test_case )
#define WhileInI643EOF(X, Y, Z) int current_test_case = 1; for ( i64 X, Y, Z, current_test_case = 1; scanf("%lld%lld%lld", &X, &Y, &Z) == 3; ++current_test_case )
#define WhileInInt1EOF(X) for ( int X, current_test_case = 1; scanf("%d", &X) == 1; ++current_test_case )
#define WhileInInt2EOF(X, Y) for ( int X, Y, current_test_case = 1; scanf("%d%d", &X, &Y) == 2; ++current_test_case )
#define WhileInInt3EOF(X, Y, Z) for ( int X, Y, Z, current_test_case = 1; scanf("%d%d%d", &X, &Y, &Z) == 3; ++current_test_case )
#define WhileInGlobalI641EOF(X) for ( int current_test_case = 1; scanf("%lld", &X) == 1; ++current_test_case )
#define WhileInGlobalI642EOF(X, Y) for ( int current_test_case = 1; scanf("%lld%lld", &X, &Y) == 2; ++current_test_case )
#define WhileInGlobalI643EOF(X, Y, Z) for ( int current_test_case = 1; scanf("%lld%lld%lld", &X, &Y, &Z) == 3; ++current_test_case )
#define WhileInGlobalInt1EOF(X) for ( int current_test_case = 1; scanf("%d", &X) == 1; ++current_test_case )
#define WhileInGlobalInt2EOF(X, Y) for ( int current_test_case = 1; scanf("%d%d", &X, &Y) == 2; ++current_test_case )
#define WhileInGlobalInt3EOF(X, Y, Z) for ( int current_test_case = 1; scanf("%d%d%d", &X, &Y, &Z) == 3; ++current_test_case )
////////////////////// Reading Utilities ///////////////////////

///////////////////////// Basic Utilities //////////////////////////
#define SIZE(N, V) int N = static_cast<int>((V).size())
#define GSIZE(N, V) (N) = static_cast<int>((V).size())
#define ALL(V) (V).begin(), (V).end()
#define UNIQUE(C) {sort(ALL(C)); C.resize(unique(ALL(C)) - C.begin());}
#define CAST(X, Y) {stringstream ss; ss << (X); ss >> (Y);}
typedef long long i64;
const i64 ooLL = 0x3f3f3f3f3f3f3f3fLL;
const int oo = 0x3f3f3f3f;
const double eps = 1e-9;
///////////////////////// Basic Utilities //////////////////////////

////////////////////////// Solution ///////////////////////////
template<typename _Type>
int PopCount(_Type x) {
  static int count[256] = {
    0, 1, 1, 2, 1, 2, 2, 3, 1, 2, 2, 3, 2, 3, 3, 4,
    1, 2, 2, 3, 2, 3, 3, 4, 2, 3, 3, 4, 3, 4, 4, 5,
    1, 2, 2, 3, 2, 3, 3, 4, 2, 3, 3, 4, 3, 4, 4, 5,
    2, 3, 3, 4, 3, 4, 4, 5, 3, 4, 4, 5, 4, 5, 5, 6,
    1, 2, 2, 3, 2, 3, 3, 4, 2, 3, 3, 4, 3, 4, 4, 5,
    2, 3, 3, 4, 3, 4, 4, 5, 3, 4, 4, 5, 4, 5, 5, 6,
    2, 3, 3, 4, 3, 4, 4, 5, 3, 4, 4, 5, 4, 5, 5, 6,
    3, 4, 4, 5, 4, 5, 5, 6, 4, 5, 5, 6, 5, 6, 6, 7,
    1, 2, 2, 3, 2, 3, 3, 4, 2, 3, 3, 4, 3, 4, 4, 5,
    2, 3, 3, 4, 3, 4, 4, 5, 3, 4, 4, 5, 4, 5, 5, 6,
    2, 3, 3, 4, 3, 4, 4, 5, 3, 4, 4, 5, 4, 5, 5, 6,
    3, 4, 4, 5, 4, 5, 5, 6, 4, 5, 5, 6, 5, 6, 6, 7,
    2, 3, 3, 4, 3, 4, 4, 5, 3, 4, 4, 5, 4, 5, 5, 6,
    3, 4, 4, 5, 4, 5, 5, 6, 4, 5, 5, 6, 5, 6, 6, 7,
    3, 4, 4, 5, 4, 5, 5, 6, 4, 5, 5, 6, 5, 6, 6, 7,
    4, 5, 5, 6, 5, 6, 6, 7, 5, 6, 6, 7, 6, 7, 7, 8
  };
  int c = 0;
  while ( x ) {
    c += count[x & 0xFF];
    x >>= 8;
  }
  return c;
}

double p[18][18];
double dp[1 << 18];
int main() {
#ifdef ZYX_MACHINE
  freopen("xxx.in", "rt", stdin);
  //freopen("xxx.out", "wt", stdout);
#endif  //  #ifdef ZYX_MACHINE
  InInt1(N);
  for ( int i = 0; i < N; ++i ) for ( int j = 0; j < N; ++j ) scanf("%lf", &p[i][j]);
  dp[(1 << N) - 1] = 1;
  for ( int mask = (1 << N) - 2; mask; --mask ) {
    for ( int i = 0; i < N; ++i ) if ( ((1 << i) & mask) == 0 ) for ( int j = 0; j < N; ++j ) if ( (1 << j) & mask ) {
      dp[mask] += dp[mask | (1 << i)] * p[j][i];
    }
    int M = PopCount(mask);
    dp[mask] /= (N - M) * M;
  }
  double total = 0;
  for ( int i = 0; i < N; ++i ) total += dp[1 << i];
  for ( int i = 0; i < N; ++i ) {
    if ( i ) printf(" ");
    printf("%.6lf", dp[1 << i] / total);
  }
  return 0;
}
////////////////////////// Solution ///////////////////////////
// BEGIN CUT HERE
//Znippet tag
// END CUT HERE


#ifdef _MSC_VER
#pragma warning(disable:4996)  // deprecations
#endif  //  #ifdef _MSC_VER
#include <functional>
#include <algorithm>
#include <iostream>
#include <numeric>
#include <utility>
#include <sstream>
#include <complex>
#include <limits>
#include <string>
#include <bitset>
#include <vector>
#include <queue>
#include <stack>
#include <list>
#include <map>
#include <set>
#include <stdlib.h>
#include <assert.h>
#include <stdarg.h>
#include <string.h>
#include <ctype.h>
#include <stdio.h>
#include <float.h>
#include <math.h>
#include <time.h>
using namespace std;

////////////////////// Debug Utilities ///////////////////////
void dprintf(char* format, ...) {
  fprintf(stderr, "DEBUG: ");
  va_list argp; va_start(argp, format);
  vfprintf(stderr, format, argp); va_end(argp);
  fprintf(stderr, "\n");
}
////////////////////// Debug Utilities ///////////////////////

////////////////////// Reading Utilities ///////////////////////
static char stringReader[2097152];
static inline bool ReadLine() {
  char* ptr = fgets(stringReader, sizeof(stringReader), stdin);
  if ( ptr == 0 ) return false;
  int N = strlen(stringReader);
  if ( stringReader[N - 1] == '\n' ) stringReader[N - 1] = 0;
  return true;
}
#define InLine(X) string X; ReadLine(); X = stringReader
#define InString1(X) string X; scanf("%s", stringReader); X = stringReader
#define InString2(X, Y) string X, Y; scanf("%s", stringReader); X = stringReader; scanf("%s", stringReader); Y = stringReader
#define InString3(X, Y, Z) string X, Y, Z; scanf("%s", stringReader); X = stringReader; scanf("%s", stringReader); Y = stringReader; scanf("%s", stringReader); Z = stringReader
#define InString4(X, Y, Z) string X, Y, Z, W; scanf("%s", stringReader); X = stringReader; scanf("%s", stringReader); Y = stringReader; scanf("%s", stringReader); Z = stringReader; scanf("%s", stringReader); W = stringReader
#define InDouble1(X) double X; scanf("%lf", &X)
#define InDouble2(X, Y) double X, Y; scanf("%lf%lf", &X, &Y)
#define InDouble3(X, Y, Z) double X, Y, Z; scanf("%lf%lf%lf", &X, &Y, &Z)
#define InDouble4(X, Y, Z, W) double X, Y, Z, W; scanf("%lf%lf%lf%lf", &X, &Y, &Z, &W)
#define InI641(X) i64 X; scanf("%lld", &X)
#define InI642(X, Y) i64 X, Y; scanf("%lld%lld", &X, &Y)
#define InI643(X, Y, Z) i64 X, Y, Z; scanf("%lld%lld%lld", &X, &Y, &Z)
#define InI644(X, Y, Z, W) i64 X, Y, Z, W; scanf("%lld%lld%lld%lld", &X, &Y, &Z, &W)
#define InInt1(X) int X; scanf("%d", &X)
#define InInt2(X, Y) int X, Y; scanf("%d%d", &X, &Y)
#define InInt3(X, Y, Z) int X, Y, Z; scanf("%d%d%d", &X, &Y, &Z)
#define InInt4(X, Y, Z, W) int X, Y, Z, W; scanf("%d%d%d%d", &X, &Y, &Z, &W)
#define InGlobalLine(X) ReadLine(); X = stringReader
#define InGlobalString1(X) scanf("%s", stringReader); X = stringReader
#define InGlobalString2(X, Y) scanf("%s", stringReader); X = stringReader; scanf("%s", stringReader); Y = stringReader
#define InGlobalString3(X, Y, Z) scanf("%s", stringReader); X = stringReader; scanf("%s", stringReader); Y = stringReader; scanf("%s", stringReader); Z = stringReader
#define InGlobalString4(X, Y, Z, W) scanf("%s", stringReader); X = stringReader; scanf("%s", stringReader); Y = stringReader; scanf("%s", stringReader); Z = stringReader; scanf("%s", stringReader); W = stringReader
#define InGlobalDouble1(X) scanf("%lf", &X)
#define InGlobalDouble2(X, Y) scanf("%lf%lf", &X, &Y)
#define InGlobalDouble3(X, Y, Z) scanf("%lf%lf%lf", &X, &Y, &Z)
#define InGlobalDouble4(X, Y, Z, W) scanf("%lf%lf%lf%lf", &X, &Y, &Z, &W)
#define InGlobalI641(X) scanf("%lld", &X)
#define InGlobalI642(X, Y) scanf("%lld%lld", &X, &Y)
#define InGlobalI643(X, Y, Z) scanf("%lld%lld%lld", &X, &Y, &Z)
#define InGlobalI644(X, Y, Z, W) scanf("%lld%lld%lld%lld", &X, &Y, &Z, &W)
#define InGlobalInt1(X) scanf("%d", &X)
#define InGlobalInt2(X, Y) scanf("%d%d", &X, &Y)
#define InGlobalInt3(X, Y, Z) scanf("%d%d%d", &X, &Y, &Z)
#define InGlobalInt4(X, Y, Z, W) scanf("%d%d%d%d", &X, &Y, &Z, &W)
#define InVectorLine(X, N) vector<string> X(N); for ( int i_##X = 0; i_##X < N; ++i_##X ) ReadLine(), X[i_##X] = stringReader;
#define InVectorString(X, N) vector<string> X(N); for ( int i_##X = 0; i_##X < N; ++i_##X ) scanf("%s", stringReader), X[i_##X] = stringReader
#define InVectorDouble(X, N) vector<double> X(N); for ( int i_##X = 0; i_##X < N; ++i_##X ) scanf("%lf", &X[i_##X])
#define InVectorI64(X, N) vector<i64> X(N); for ( int i_##X = 0; i_##X < N; ++i_##X ) scanf("%lld", &X[i_##X])
#define InVectorInt(X, N) vector<int> X(N); for ( int i_##X = 0; i_##X < N; ++i_##X ) scanf("%d", &X[i_##X])
#define InVectorGlobalLine(X, N) X.assign(N, ""); for ( int i_##X = 0; i_##X < N; ++i_##X ) ReadLine(), X[i_##X] = stringReader;
#define InVectorGlobalString(X, N) X.assign(N, ""); for ( int i_##X = 0; i_##X < N; ++i_##X ) scanf("%s", stringReader), X[i_##X] = stringReader
#define InVectorGlobalDouble(X, N) X.assign(N, 0); for ( int i_##X = 0; i_##X < N; ++i_##X ) scanf("%lf", &X[i_##X])
#define InVectorGlobalI64(X, N) X.assign(N, 0); for ( int i_##X = 0; i_##X < N; ++i_##X ) scanf("%lld", &X[i_##X])
#define InVectorGlobalInt(X, N) X.assign(N, 0); for ( int i_##X = 0; i_##X < N; ++i_##X ) scanf("%d", &X[i_##X])
#define InArrayLine(X, N, MAX_N) string X[MAX_N]; for ( int i_##X = 0; i_##X < N; ++i_##X ) ReadLine(), X[i_##X] = stringReader;
#define InArrayString(X, N, MAX_N) string X[MAX_N]; for ( int i_##X = 0; i_##X < N; ++i_##X ) scanf("%s", stringReader), X[i_##X] = stringReader
#define InArrayDouble(X, N, MAX_N) double X[MAX_N]; for ( int i_##X = 0; i_##X < N; ++i_##X ) scanf("%lf", &X[i_##X])
#define InArrayI64(X, N, MAX_N) i64 X[MAX_N]; for ( int i_##X = 0; i_##X < N; ++i_##X ) scanf("%lld", &X[i_##X])
#define InArrayInt(X, N, MAX_N) int X[MAX_N]; for ( int i_##X = 0; i_##X < N; ++i_##X ) scanf("%d", &X[i_##X])
#define InArrayLineGlobal(X, N) for ( int i_##X = 0; i_##X < N; ++i_##X ) ReadLine(), X[i_##X] = stringReader;
#define InArrayStringGlobal(X, N) for ( int i_##X = 0; i_##X < N; ++i_##X ) scanf("%s", stringReader), X[i_##X] = stringReader
#define InArrayDoubleGlobal(X, N) for ( int i_##X = 0; i_##X < N; ++i_##X ) scanf("%lf", &X[i_##X])
#define InArrayI64Global(X, N) for ( int i_##X = 0; i_##X < N; ++i_##X ) scanf("%lld", &X[i_##X])
#define InArrayIntGlobal(X, N) for ( int i_##X = 0; i_##X < N; ++i_##X ) scanf("%d", &X[i_##X])
#define WhileTests() int TOTAL_TEST_CASES; ReadLine(); sscanf(stringReader, "%d", &TOTAL_TEST_CASES); for ( int current_test_case = 1; current_test_case <= TOTAL_TEST_CASES; ++current_test_case )
#define WhileInString(X) int current_test_case = 1; for ( string X; scanf("%s", &X) == 1 && (X != ""); ++current_test_case )
#define WhileInI641(X) int current_test_case = 1; for ( i64 X; scanf("%lld", &X) == 1 && (X); ++current_test_case )
#define WhileInI642(X, Y) int current_test_case = 1; for ( i64 X, Y, current_test_case = 1; scanf("%lld%lld", &X, &Y) == 2 && (X|Y); ++current_test_case )
#define WhileInI643(X, Y, Z) int current_test_case = 1; for ( i64 X, Y, Z, current_test_case = 1; scanf("%lld%lld%lld", &X, &Y, &Z) == 3 && (X|Y|Z); ++current_test_case )
#define WhileInInt1(X) for ( int X, current_test_case = 1; scanf("%d", &X) == 1 && (X); ++current_test_case )
#define WhileInInt2(X, Y) for ( int X, Y, current_test_case = 1; scanf("%d%d", &X, &Y) == 2 && (X|Y); ++current_test_case )
#define WhileInInt3(X, Y, Z) for ( int X, Y, Z, current_test_case = 1; scanf("%d%d%d", &X, &Y, &Z) == 3 && (X|Y|Z); ++current_test_case )
#define WhileInGlobalI641(X) for ( int current_test_case = 1; scanf("%lld", &X) == 1 && (X); ++current_test_case )
#define WhileInGlobalI642(X, Y) for ( int current_test_case = 1; scanf("%lld%lld", &X, &Y) == 2 && (X|Y); ++current_test_case )
#define WhileInGlobalI643(X, Y, Z) for ( int current_test_case = 1; scanf("%lld%lld%lld", &X, &Y, &Z) == 3 && (X|Y|Z); ++current_test_case )
#define WhileInGlobalInt1(X) for ( int current_test_case = 1; scanf("%d", &X) == 1 && (X); ++current_test_case )
#define WhileInGlobalInt2(X, Y) for ( int current_test_case = 1; scanf("%d%d", &X, &Y) == 2 && (X|Y); ++current_test_case )
#define WhileInGlobalInt3(X, Y, Z) for ( int current_test_case = 1; scanf("%d%d%d", &X, &Y, &Z) == 3 && (X|Y|Z); ++current_test_case )
#define WhileInStringEOF(X) int current_test_case = 1; for ( string X; scanf("%s", &X) == 1; ++current_test_case )
#define WhileInI641EOF(X) int current_test_case = 1; for ( i64 X; scanf("%lld", &X) == 1; ++current_test_case )
#define WhileInI642EOF(X, Y) int current_test_case = 1; for ( i64 X, Y, current_test_case = 1; scanf("%lld%lld", &X, &Y) == 2; ++current_test_case )
#define WhileInI643EOF(X, Y, Z) int current_test_case = 1; for ( i64 X, Y, Z, current_test_case = 1; scanf("%lld%lld%lld", &X, &Y, &Z) == 3; ++current_test_case )
#define WhileInInt1EOF(X) for ( int X, current_test_case = 1; scanf("%d", &X) == 1; ++current_test_case )
#define WhileInInt2EOF(X, Y) for ( int X, Y, current_test_case = 1; scanf("%d%d", &X, &Y) == 2; ++current_test_case )
#define WhileInInt3EOF(X, Y, Z) for ( int X, Y, Z, current_test_case = 1; scanf("%d%d%d", &X, &Y, &Z) == 3; ++current_test_case )
#define WhileInGlobalI641EOF(X) for ( int current_test_case = 1; scanf("%lld", &X) == 1; ++current_test_case )
#define WhileInGlobalI642EOF(X, Y) for ( int current_test_case = 1; scanf("%lld%lld", &X, &Y) == 2; ++current_test_case )
#define WhileInGlobalI643EOF(X, Y, Z) for ( int current_test_case = 1; scanf("%lld%lld%lld", &X, &Y, &Z) == 3; ++current_test_case )
#define WhileInGlobalInt1EOF(X) for ( int current_test_case = 1; scanf("%d", &X) == 1; ++current_test_case )
#define WhileInGlobalInt2EOF(X, Y) for ( int current_test_case = 1; scanf("%d%d", &X, &Y) == 2; ++current_test_case )
#define WhileInGlobalInt3EOF(X, Y, Z) for ( int current_test_case = 1; scanf("%d%d%d", &X, &Y, &Z) == 3; ++current_test_case )
////////////////////// Reading Utilities ///////////////////////

///////////////////////// Basic Utilities //////////////////////////
#define SIZE(N, V) int N = static_cast<int>((V).size())
#define GSIZE(N, V) (N) = static_cast<int>((V).size())
#define ALL(V) (V).begin(), (V).end()
#define UNIQUE(C) {sort(ALL(C)); C.resize(unique(ALL(C)) - C.begin());}
#define CAST(X, Y) {stringstream ss; ss << (X); ss >> (Y);}
typedef long long i64;
const i64 ooLL = 0x3f3f3f3f3f3f3f3fLL;
const int oo = 0x3f3f3f3f;
const double eps = 1e-9;
///////////////////////// Basic Utilities //////////////////////////

////////////////////////// Solution ///////////////////////////
template<typename _Type>
int PopCount(_Type x) {
  static int count[256] = {
    0, 1, 1, 2, 1, 2, 2, 3, 1, 2, 2, 3, 2, 3, 3, 4,
    1, 2, 2, 3, 2, 3, 3, 4, 2, 3, 3, 4, 3, 4, 4, 5,
    1, 2, 2, 3, 2, 3, 3, 4, 2, 3, 3, 4, 3, 4, 4, 5,
    2, 3, 3, 4, 3, 4, 4, 5, 3, 4, 4, 5, 4, 5, 5, 6,
    1, 2, 2, 3, 2, 3, 3, 4, 2, 3, 3, 4, 3, 4, 4, 5,
    2, 3, 3, 4, 3, 4, 4, 5, 3, 4, 4, 5, 4, 5, 5, 6,
    2, 3, 3, 4, 3, 4, 4, 5, 3, 4, 4, 5, 4, 5, 5, 6,
    3, 4, 4, 5, 4, 5, 5, 6, 4, 5, 5, 6, 5, 6, 6, 7,
    1, 2, 2, 3, 2, 3, 3, 4, 2, 3, 3, 4, 3, 4, 4, 5,
    2, 3, 3, 4, 3, 4, 4, 5, 3, 4, 4, 5, 4, 5, 5, 6,
    2, 3, 3, 4, 3, 4, 4, 5, 3, 4, 4, 5, 4, 5, 5, 6,
    3, 4, 4, 5, 4, 5, 5, 6, 4, 5, 5, 6, 5, 6, 6, 7,
    2, 3, 3, 4, 3, 4, 4, 5, 3, 4, 4, 5, 4, 5, 5, 6,
    3, 4, 4, 5, 4, 5, 5, 6, 4, 5, 5, 6, 5, 6, 6, 7,
    3, 4, 4, 5, 4, 5, 5, 6, 4, 5, 5, 6, 5, 6, 6, 7,
    4, 5, 5, 6, 5, 6, 6, 7, 5, 6, 6, 7, 6, 7, 7, 8
  };
  int c = 0;
  while ( x ) {
    c += count[x & 0xFF];
    x >>= 8;
  }
  return c;
}

int M;
vector<vector<double> > p;
double memo[1 << 18][18];
bool mark[1 << 18][18];

double f(int mask, int k) {
  if ( ((1 << k) & mask) == 0 ) {
    return 0;
  }
  int N = PopCount(mask);
  if ( N < 2 ) return 1;
  double& best = memo[mask][k];
  if ( mark[mask][k] ) return best;
  mark[mask][k] = true;
  best = 0;
  for ( int i = 0; i < M; ++i )
    if ( (1 << i) & mask )
      for ( int j = i + 1; j < M; ++j )
        if ( (1 << j) & mask ) {
    double p1 = p[i][j];
    double p2 = p[j][i];
    best += f(mask ^ (1 << j), k) * p1;
    best += f(mask ^ (1 << i), k) * p2;
  }
  best = 2 * best / (N * (N - 1));
  return best;
}

int main() {
#ifdef ZYX_MACHINE
  freopen("xxx.in", "rt", stdin);
  //freopen("xxx.out", "wt", stdout);
#endif  //  #ifdef ZYX_MACHINE
  InInt1(N);
  M = N;
  p.assign(N, vector<double>(N));
  for ( int i = 0; i < N; ++i ) for ( int j = 0; j < N; ++j ) scanf("%lf", &p[i][j]);
  for ( int i = 0; i < N; ++i ) {
    if ( i ) printf(" ");
    printf("%.6lf", f((1 << N) - 1, i));
  }
  return 0;
}
////////////////////////// Solution ///////////////////////////
// BEGIN CUT HERE
//Znippet tag
// END CUT HERE


#include <fstream>
#include <vector>
#include <algorithm>
#include <sstream>
#include <cstdio>
#include <string>
#include <iostream>
#include <queue>
#include <cmath>
#include <set>
#include <memory.h>

#define dat cin
#define sol cout

using namespace std;

double D[20][20]={0};
int n=0;

double F[1<<18]={0};

int main()
{
//	ifstream dat("input.txt");
//	ofstream sol("output.txt");
	dat >> n;
	for(int i=0;i<n;i++)
		for(int j=0;j<n;j++)
			dat >> D[i][j];
	F[0]=1;
	for(int mask=0;mask<(1<<n);mask++)
	{
		for(int i=0;i<n;i++)
		{
			if (mask&(1<<i)) continue;
			for(int j=0;j<n;j++)
			{
				if (i==j) continue;
				if (mask&(1<<j)) continue;
				F[mask|(1<<j)]+=F[mask]*D[i][j];
				F[mask|(1<<i)]+=F[mask]*D[j][i];
			}
		}
	}
	sol.precision(10);
	double sum=0;
	for(int i=0;i<n;i++)
		sum+=F[(1<<(n))-1-(1<<i)];
	for(int i=0;i<n;i++)
		if (i==0) sol << F[(1<<(n))-1-(1<<i)]/sum;
		else sol << " " << F[(1<<(n))-1-(1<<i)]/sum;
	sol << endl;
	return 0;
}


#include <fstream>
#include <vector>
#include <algorithm>
#include <sstream>
#include <cstdio>
#include <string>
#include <iostream>
#include <queue>
#include <cmath>
#include <set>
#include <memory.h>

#define dat cin
#define sol cout

using namespace std;

double D[20][20]={0};
int n=0;

double F[1<<18]={0};

int main()
{
//  ifstream dat("input.txt");
//  ofstream sol("output.txt");
    dat >> n;
    for(int i=0;i<n;i++)
        for(int j=0;j<n;j++)
            dat >> D[i][j];
    F[0]=1;
    for(int mask=0;mask<(1<<n);mask++)
    {
        for(int i=0;i<n;i++)
        {
            if (mask&(1<<i)) continue;
            for(int j=0;j<n;j++)
            {
                if (i==j) continue;
                if (mask&(1<<j)) continue;
                F[mask|(1<<j)]+=F[mask]*D[i][j];
                F[mask|(1<<i)]+=F[mask]*D[j][i];
            }
        }
    }
    sol.precision(10);
    double sum=0;
    for(int i=0;i<n;i++)
        sum+=F[(1<<(n))-1-(1<<i)];
    for(int i=0;i<n;i++)
        if (i==0) sol << F[(1<<(n))-1-(1<<i)]/sum;
        else sol << " " << F[(1<<(n))-1-(1<<i)]/sum;
    sol << endl;
    return 0;
}


#include <iostream>
#include <cstring>
#include <algorithm>
#include <vector>
#include <queue>
#include <map>
#include <set>
using namespace std;
#define	out(x)		(cout << #x << ": " << x << endl)
#define	MM(m, what)	(memset(m, what, sizeof(m)))
template<class T>void show(T a, int l){for(int i = 0; i < l; ++i)cout << a[i] << ' '; cout << endl;}
template<class T>void show(T a, int l, int r){for(int i = 0;i < l; ++i)show(a[i], r); cout << endl;}
typedef long long LL;
const int MAXN = 20;
double p[MAXN][MAXN], f[1<<18];
int n;

void showB(int x){
	for(int i = 0; i < n; ++i){
		printf("%d", x%2);
		x /= 2;
	}
	printf("\n");
}

void dp(){
	int i, j, k, s, next, up = 1<<n;
	for(s = 0; s < up; ++s)	f[s] = 0;
	f[up-1] = 1;//first day
	for(s = up-1; s >= 1; --s){
		for(i = k = 0; i < n; ++i){
			if(!((s>>i)&1))	continue;
			for(j = i+1; j < n; ++j){//����i meet j��j meet i��ͬ
				if(i == j || !((s>>j)&1))	continue;
					++k;
			}
		}
		for(i = 0; i < n; ++i){
			if(!((s>>i)&1))	continue;
			for(j = 0; j < n; ++j){
				if(i == j || !((s>>j)&1))	continue;
				next = s&(~(1<<j));//i win
				f[next] += f[s]*p[i][j]/k;
			}
		}
	//	showB(s); printf("f[%d]=%.6f\n", s, f[s]);
	}
//	printf("\n");
	for(i = 0; i < n; ++i){
		printf("%.6f", f[1<<i]);
		if(i != n-1)	printf(" ");
	}
	printf("\n");
}

int main(){
	#ifdef _DEBUG
		freopen("in.txt", "r", stdin);	freopen("out.txt", "w", stdout);
	#endif
	while(scanf("%d", &n) != EOF){
		int i, j;
		for(i = 0; i < n; ++i)
			for(j = 0; j < n; ++j)
				scanf("%lf", &p[i][j]);
		dp();
	}
	return 0;
}


#include <iostream>
#include <queue>
using namespace std;

double p[1<<18];
int u[1<<18];
double arr[18][18];
int main()
{
	//freopen("input.txt","r",stdin);
	int n;
	cin>>n;

	for(int i=0;i<n;i++)
		for(int j=0;j<n;j++)
			cin>>arr[i][j];

	p[(1<<n)-1] = 1.;

	queue<int> lst;
	lst.push((1<<n)-1);

	while( lst.size() )
	{
		int d = lst.front();
		lst.pop();
		for(int i=0;i<n;i++)
			for(int j=0;j<n;j++)
				if( i!=j && (d & (1<<i)) && (d & (1<<j) ) )
				{
					double tp=0;
					double cnt = 0;

					for(int k=0;k<n;k++)
					{
						if( d & (1<<k) )
							cnt+=1.;
					}
					if( cnt < 2 )
						continue;

					tp = (1./cnt*(1./(cnt-1)))*2.;
					tp *= arr[i][j];

					int q = d - (1<<j);
					if( u[q] == 0 )
					{
						u[q] = 1;
						lst.push(q);
					}
					p[q] += (p[d]*tp);
				}
	}
	cout.setf(ios::fixed);
	cout.precision(9);
	for(int i=0;i<n;i++)
		cout<<p[1<<i]<<" ";

	return 0;
}


#include <iostream>
#include <list>
using namespace std;

double p[1<<18];
int u[1<<18];
double arr[18][18];
int main()
{
	//freopen("input.txt","r",stdin);
	int n;
	cin>>n;

	for(int i=0;i<n;i++)
		for(int j=0;j<n;j++)
			cin>>arr[i][j];

	p[(1<<n)-1] = 1.;

	list<int> lst;
	lst.push_back((1<<n)-1);

	while( lst.size() )
	{
		int d = lst.front();
		lst.pop_front();
		for(int i=0;i<n;i++)
			for(int j=0;j<n;j++)
				if( i!=j && (d & (1<<i)) && (d & (1<<j) ) )
				{
					double tp=0;
					double cnt = 0;

					for(int k=0;k<n;k++)
					{
						if( d & (1<<k) )
							cnt+=1.;
					}
					if( cnt < 2 )
						continue;

					tp = (1./cnt*(1./(cnt-1)))*2.;
					tp *= arr[i][j];

					int q = d - (1<<j);
					if( u[q] == 0 )
					{
						u[q] = 1;
						lst.push_back(q);
					}
					p[q] += (p[d]*tp);
				}
	}
	cout.setf(ios::fixed);
	cout.precision(9);
	for(int i=0;i<n;i++)
		cout<<p[1<<i]<<" ";

	return 0;
}


#include <iostream>
#include <stdio.h>
using namespace std;
const int maxn = 18;

int n;
double p[maxn][maxn];
double d[1 << maxn];

int main()
{
#ifndef ONLINE_JUDGE
	freopen("input.txt", "r", stdin);
#endif

	cin >> n;
	for (int yy = 0; yy < n; yy++)
		for (int xx = 0; xx < n; xx++)
			cin >> p[yy][xx];
	cout.precision(9);
	cout.setf(ios::fixed);

	d[(1 << n) - 1] = 1;
	for (int m = (1 << n) - 2; m >= 1; m--)
	{
		int ones = 0;
		for (int i = 0; i < n; i++) if (m & (1 << i)) ones++;
		double cp = 2.0 / (ones * (ones + 1));
		double temp = 0;

		for (int k = 0; k < n; k++)
			if (!(m & (1 << k)))
				for (int w = 0; w < n; w++)
					if (m & (1 << w))
						temp += d[m | (1 << k)] * p[w][k];

		d[m] = cp * temp;
	}

	for (int i = 0; i < n; i++)
		cout << d[1 << i] << ' ';
	cout << endl;

	return 0;
}


#define _CRT_SECURE_NO_DEPRECATE
#include <iostream>
#include <bitset>
#include <string>
#include <vector>
#include <algorithm>
#include <ctime>
#include <queue>
#include <cstring>
#include <set>
#include <map>
#include <sstream>
#include <cmath>
#include <fstream>
using namespace std;
#define rp(i,n) for(int (i)=0;(i)<(n);++(i))
#define pb push_back
#define L(s) (int)s.size()
#define mp make_pair
#define pii pair<int,int>
//#define x first
//#define y second
#define inf 1000000000
#define VI vector<int>
#define ll long long
#define all(s) (s).begin(),(s).end()
#define C(u) memset((u),0,sizeof((u)))
double f[1<<18][18];
double a[22][22];
int n;
int main()
{
	cin>>n;
	rp(i,n)
		rp(j,n)
		cin>>a[i][j];
	for(int mask=1;mask<(1<<n);++mask)
	{
		int cnt=0;
		for(int i=0;i<n;++i)
			if (mask&(1<<i))
				++cnt;
		if (cnt==1)
		{
			rp(i,n)
				if (mask==(1<<i))
					f[mask][i]=1;
				else
					f[mask][i]=0;
			continue;
		}
		double pro=1.0/(cnt*(cnt-1)/2.0);
		for(int i=0;i<n;++i)
			if (mask&(1<<i))
				for(int j=i+1;j<n;++j)
					if (mask&(1<<j))
						for(int k=0;k<n;++k)
							f[mask][k]+=(a[i][j]*f[mask-(1<<j)][k]+a[j][i]*f[mask-(1<<i)][k])*pro;
	}
	rp(i,n)
	{
		if (i)
			cout<<" ";
		printf("%0.6f",f[(1<<n)-1][i]);
	}
	cout<<endl;
}


#include <iostream>
#include <cstdio>
#include <vector>
#include <algorithm>
#include <cstring>
#include <string>
#include <map>
#include <queue>
#include <sstream>
#include <numeric>
#include <functional>
#include <set>
#include <cmath>
#include <stack>
using namespace std;

#pragma comment(linker,"/stack:16000000")

#define ALL(v) v.begin(),v.end()
#define SZ(v) (int)v.size()
#define mset(A,x) memset((A),(x),sizeof(A))
#define FOR(i,start,N) for(int i=start;i<N;++i)
#define FORSZ(i,start,v) FOR(i,start,SZ(v))
#define REPSZ(i,v) FORSZ(i,0,v)
#define FORE(i,start,N) FOR(i,start,N+1)
#define make_unique(v) v.resize(unique(ALL(v))-v.begin())
#define debug(x) cout<<#x<<" = "<<x<<endl;
#define adebug(A,N) FOR(i,0,N) cout<<#A<<"["<<i<<"] = "<<A[i]<<endl;
#define adebug2d(a,n,m) FOR(i,0,n) { FOR(j,0,m) { cout<<a[i][j]<<" ";} cout<<endl;}
#define vdebug(v) REPSZ(i,v) cout<<#v<<"["<<i<<"] = "<<v[i]<<endl;
#define selfx(x,f,a) x = f(x,a)

typedef pair<int,int> pii;
typedef long long i64;
typedef vector<int> VI; typedef vector< vector<int> > VVI;
typedef vector<string> VS;

const int inf = 1<<25;
const double eps = 1e-9;

double memo[1<<18];
bool was[1<<18];

double a[18][18];
int n;

double f(int mask,int alive)
{
    if(alive == n) return 1.0;
    if(was[mask])
        return memo[mask];
    was[mask] = true;

    double p = 2.0/alive/(alive+1);
    double ret = 0.0;
    FOR(i,0,n)
        if(mask&(1<<i))
            FOR(j,0,n)
            if(!(mask&(1<<j)))
                ret+=a[i][j]*f(mask^(1<<j),alive+1);

    return memo[mask] = p*ret;
}

int main()
{
    //freopen ("input.txt","r",stdin);
    //freopen ("in.txt","r",stdin);
    //freopen ("output.txt","w",stdout);

    scanf("%d",&n);

    FOR(i,0,n)
        FOR(j,0,n)
        scanf("%lf",&a[i][j]);

    mset(was,false);

    FOR(i,0,n)
        printf("%.6lf ",f(1<<i,1));

    return 0;
}


#include <iostream>
#include <cstdio>
#include <vector>
#include <algorithm>
#include <cstring>
#include <string>
#include <map>
#include <queue>
#include <sstream>
#include <numeric>
#include <functional>
#include <set>
#include <cmath>
#include <stack>
using namespace std;

#pragma comment(linker,"/stack:16000000")

#define ALL(v) v.begin(),v.end()
#define SZ(v) (int)v.size()
#define mset(A,x) memset((A),(x),sizeof(A))
#define FOR(i,start,N) for(int i=start;i<N;++i)
#define FORSZ(i,start,v) FOR(i,start,SZ(v))
#define REPSZ(i,v) FORSZ(i,0,v)
#define FORE(i,start,N) FOR(i,start,N+1)
#define make_unique(v) v.resize(unique(ALL(v))-v.begin())
#define debug(x) cout<<#x<<" = "<<x<<endl;
#define adebug(A,N) FOR(i,0,N) cout<<#A<<"["<<i<<"] = "<<A[i]<<endl;
#define adebug2d(a,n,m) FOR(i,0,n) { FOR(j,0,m) { cout<<a[i][j]<<" ";} cout<<endl;}
#define vdebug(v) REPSZ(i,v) cout<<#v<<"["<<i<<"] = "<<v[i]<<endl;
#define selfx(x,f,a) x = f(x,a)

typedef pair<int,int> pii;
typedef long long i64;
typedef vector<int> VI; typedef vector< vector<int> > VVI;
typedef vector<string> VS;

const int inf = 1<<25;
const double eps = 1e-9;

double memo[1<<18];
bool was[1<<18];

double a[18][18];
int n;

double f(int who,int mask,int alive)
{
    if(!(mask&(1<<who)))
        return 0.0;
    if(alive == 1)
        return 1.0;
    if(was[mask])
        return memo[mask];
    was[mask] = true;

    //int pairs = alive*(alive-1)/2.0;
    double p = 2.0/alive/(alive-1);
    double ret = 0.0;
    FOR(j,0,n)
        if(who!=j && (mask&(1<<j)))
            ret+=p*a[who][j]*f(who,mask^(1<<j),alive-1);

    FOR(i,0,n)
        if(i!=who&&(mask&(1<<i)))
            FOR(j,0,n)
            if(j!=who&&((mask&(1<<j))))
                ret+=p*a[i][j]*f(who,mask^(1<<j),alive-1);
    return memo[mask] = ret;
}

int main()
{
    //freopen ("input.txt","r",stdin);
    //freopen ("in.txt","r",stdin);
    //freopen ("output.txt","w",stdout);

    scanf("%d",&n);

    FOR(i,0,n)
        FOR(j,0,n)
        scanf("%lf",&a[i][j]);

    FOR(i,0,n)
    {
        mset(was,false);
        printf("%.6lf ",f(i,(1<<n)-1,n));
    }

    return 0;
}


#include <algorithm>
#include <cstdio>
#include <iostream>
#include <cstdlib>
#include <cmath>
#include <cstdlib>
#include <functional>

#include <vector>
#include <stack>

#include <set>
#include <map>

#include <hash_set>
#include <hash_map>

using namespace std;

#define REP(i,n) for((i)=0;(i)<(int)(n);(i)++)
#define snuke(c,itr) for(__typeof((c).begin()) itr=(c).begin();itr!=(c).end();itr++)

int n;
long double mat[20][20];
long double dp[1 << 18][18] = {0}; //!!
long double cn2[20];

int cnt(int msk) {
	int res = 0;
	while (msk) {
		++res;
		msk &= msk - 1;
	}
	return res;
}

int main() {

#ifndef ONLINE_JUDGE
	freopen("input.txt", "r", stdin);
	freopen("output.txt", "w", stdout);
#endif

	cin >> n;
	for (int i = 0; i < n; ++i) {
		for (int j = 0; j < n; ++j) {
			cin >> mat[i][j];
		}
	}

	for (int i = 0; i < n; ++i) {
		dp[1 << i][i] = 1.0;
	}

	for (int i = 2; i <= n; ++i) {
		cn2[i] = 2.0 / (i * (i - 1.0));
	}

	for (int msk = 1; msk < (1 << n); ++msk) {
		if ((msk & (msk - 1)) == 0) continue;
		int amt = cnt(msk);

		for (int i = 0; i < n; ++i) {
			if (((msk >> i) & 1) == 0) continue;
			for (int j = i + 1; j < n; ++j) {
				if (i == j) continue;
				if (((msk >> j) & 1) == 0) continue;

				long double mul = cn2[amt] * mat[i][j];
				int nmsk = msk ^ (1 << j);
				for (int k = 0; k < n; ++k)
					if ((nmsk >> k) & 1)
						dp[msk][k] += mul * dp[nmsk][k];

				mul = cn2[amt] * mat[j][i];
				nmsk = msk ^ (1 << i);
				for (int k = 0; k < n; ++k)
					if ((nmsk >> k) & 1)
						dp[msk][k] += mul * dp[nmsk][k];
			}
		}
	}

	for (int i = 0; i < n; ++i) {
		printf("%.10lf ", dp[(1 << n) - 1][i]);
	}

	return 0;

}


#include <algorithm>
#include <cstdio>
#include <iostream>
#include <cstdlib>
#include <cmath>
#include <cstdlib>
#include <functional>

#include <vector>
#include <stack>

#include <set>
#include <map>

#include <hash_set>
#include <hash_map>

using namespace std;

#define REP(i,n) for((i)=0;(i)<(int)(n);(i)++)
#define snuke(c,itr) for(__typeof((c).begin()) itr=(c).begin();itr!=(c).end();itr++)

int n;
long double mat[18][18];
long double dp[1 << 18][18] = {0}; //!!
long double cn2[18];

int cnt(int msk) {
	int res = 0;
	while (msk) {
		++res;
		msk &= msk - 1;
	}
	return res;
}

int main() {

#ifndef ONLINE_JUDGE
	freopen("input.txt", "r", stdin);
	freopen("output.txt", "w", stdout);
#endif

	cin >> n;
	for (int i = 0; i < n; ++i) {
		for (int j = 0; j < n; ++j) {
			cin >> mat[i][j];
		}
	}

	for (int i = 0; i < n; ++i) {
		dp[1 << i][i] = 1.0;
	}

	for (int i = 2; i <= n; ++i) {
		cn2[i] = 2.0 / (i * (i - 1.0));
	}

	for (int msk = 1; msk < (1 << n); ++msk) {
		if ((msk & (msk - 1)) == 0) continue;
		int amt = cnt(msk);

		for (int i = 0; i < n; ++i) {
			if (((msk >> i) & 1) == 0) continue;
			for (int j = i + 1; j < n; ++j) {
				if (i == j) continue;
				if (((msk >> j) & 1) == 0) continue;

				long double mul = cn2[amt] * mat[i][j];
				int nmsk = msk ^ (1 << j);
				for (int k = 0; k < n; ++k)
					if ((nmsk >> k) & 1)
						dp[msk][k] += mul * dp[nmsk][k];

				mul = cn2[amt] * mat[j][i];
				nmsk = msk ^ (1 << i);
				for (int k = 0; k < n; ++k)
					if ((nmsk >> k) & 1)
						dp[msk][k] += mul * dp[nmsk][k];
			}
		}
	}

	for (int i = 0; i < n; ++i) {
		printf("%.10lf ", dp[(1 << n) - 1][i]);
	}

	return 0;

}


#include<iostream>
#include<cmath>
using namespace std;
double dp[1 << 18] , p[18][18];
int n, k;
#define EPS 1e-9
double f(int bt){
    if(bt & (1 << k))
        return 0.;
    if(bt == ((1 << n) - 1 - (1 << k)))
        return 1.;
    if(dp[bt] != -1.)
        return dp[bt];
    double cnt = 0;
    dp[bt] = 0.;
    for(int i = 0; i < n; i++){
        if(!(bt & (1 << i))){
            for(int j = 0; j < i; j++){
                if(!(bt & (1 << j))){
                        double k = (f(bt + (1 << j)) * p[i][j]);
                        cnt ++;
                        dp[bt] += k;
                        k = (f(bt + (1 << i)) * p[j][i]);
                        dp[bt] += k;
                }
            }
        }
    }
    dp[bt] /= cnt;
    return dp[bt];
}
int main(){
    cin >> n;
    for(int i = 0; i < n; i++){
        for(int j = 0; j < n; j++){
            cin >> p[i][j];
        }
    }
    cout.precision(6);
    cout.flags(ios::fixed);
    for(int i = 0; i < n; i++){
        for(int i = 0; i < (1 << 18); i++)
            dp[i] = -1.;
        if(i)
            cout << " ";
        k = i;
        cout << f(0) ;
    }
    cout << endl;
    return 0;
}


#include<iostream>
#include<cmath>
using namespace std;
double dp[1 << 18] , p[18][18];
int n, l;
#define EPS 1e-9
double f(int bt){
	if(dp[bt] != -1.)
		return dp[bt];
	double cnt = 0;
	dp[bt] = 0.;
	for(int i = 0; i < n; i++){
		if(bt & (1 << i)){
			for(int j = 0; j < n; j++){
				if(!(bt & (1 << j))){
					double k = (f(bt + (1 << j)) * p[i][j]);
						cnt += f(bt + (1 << j));
						dp[bt] += k;
				}
			}
		}
	}
	dp[bt] /= cnt;
	return dp[bt];
}
int main(){
	cin >> n;
	for(int i = 0; i < n; i++){
		for(int j = 0; j < n; j++){
			cin >> p[i][j];
		}
	}
	l = 0;
	for(int i = 0; i < (1 << 18); i++)
		dp[i] = -1.;
	dp[(1 << n) -1] = 1.;
	cout.precision(6);
	cout.flags(ios::fixed);
	for(int i = 0; i < n; i++){
		if(i)
			cout << " ";
		cout << f(1 << i) ;
	}
	cout << endl;
	return 0;
}


#include <vector>
#include <list>
#include <map>
#include <set>
#include <deque>
#include <queue>
#include <stack>
#include <bitset>
#include <algorithm>
#include <functional>
#include <numeric>
#include <utility>
#include <sstream>
#include <iostream>
#include <iomanip>
#include <cstdio>
#include <cmath>
#include <cstdlib>
#include <cctype>
#include <string>
#include <cstring>
#include <cstdio>
#include <cmath>
#include <cstdlib>
#include <ctime>
#define all(c) (c).begin(),(c).end()
#define tr(c,i) for(typeof((c).begin()) i = (c).begin(); i != (c).end(); i++)
#define ll long long
#define sz(a) int((a).size())
#define pb push_back
#define SORT(x) sort((x).begin(),(x).end());
#define VI vector<int>
#define VII vector < vector <int> >
#define MP make_pair
#define SET(x,byte) memset(x,byte,sizeof(x));
#define I(x) ((x) - 'A')
#define REP(i,mx) for(int i=0;(i)<(mx);i++)
#define RFOR(i,mx,mn) for(int i=(mx);(i)>=(mn);i--)
#define FORD(i,mn,mx,k) for(int i=(mn);(i)<=(mx);i+=(k))
#define FOR(i,mn,mx) for(int i=mn;(i)<=(mx);i++)
#define U(x) (1<<(x))
#define INF 1000000000
#define DEBUG 0

using namespace std;
double arr[20][20];
long double dp[(1<<18) + 5];
int main(){
	int n;
	cin >> n;
	REP(i,n) REP(j,n) cin >> arr[i][j];
	SET(dp,0);
	//REP(i,n) dp[i][1<<i] = 1;
	dp[(1<<n)-1]=1;

	RFOR(mask,(1<<n)-1,0)
	{
		int count = 0;
		long double P = dp[mask];
		REP(l1,n) if(mask & (1<<l1))
		REP(l2,l1) if(mask & (1<<l2)) count++;

		REP(l1,n) if(mask & (1<<l1))
		REP(l2,l1) if (mask & (1<<l2))
		{
			//dp[l1][mask] +=  1.0 / (count) * arr[l1][l2] * dp[l1][mask ^ (1<<l2)];
			//dp[l2][mask] +=  1.0 / (count) * arr[l2][l1] * dp[l2][mask ^ (1<<l1)];
			dp[mask^(1<<l1)] += P*arr[l2][l1]/count;
			dp[mask^(1<<l2)] += P*arr[l1][l2]/count;
		}
	}
	REP(i,n-1) printf("%lf ", dp[1<<i]);
	printf("%lf\n", dp[1<<(n-1)]);
	return 0;
}


#include <vector>
#include <list>
#include <map>
#include <set>
#include <deque>
#include <queue>
#include <stack>
#include <bitset>
#include <algorithm>
#include <functional>
#include <numeric>
#include <utility>
#include <sstream>
#include <iostream>
#include <iomanip>
#include <cstdio>
#include <cmath>
#include <cstdlib>
#include <cctype>
#include <string>
#include <cstring>
#include <cstdio>
#include <cmath>
#include <cstdlib>
#include <ctime>
#define all(c) (c).begin(),(c).end()
#define tr(c,i) for(typeof((c).begin()) i = (c).begin(); i != (c).end(); i++)
#define ll long long
#define sz(a) int((a).size())
#define pb push_back
#define SORT(x) sort((x).begin(),(x).end());
#define VI vector<int>
#define VII vector < vector <int> >
#define MP make_pair
#define SET(x,byte) memset(x,byte,sizeof(x));
#define I(x) ((x) - 'A')
#define REP(i,mx) for(int i=0;(i)<(mx);i++)
#define RFOR(i,mx,mn) for(int i=(mx);(i)>=(mn);i--)
#define FORD(i,mn,mx,k) for(int i=(mn);(i)<=(mx);i+=(k))
#define FOR(i,mn,mx) for(int i=mn;(i)<=(mx);i++)
#define U(x) (1<<(x))
#define INF 1000000000
#define DEBUG 0

using namespace std;
double arr[20][20];
long double dp[(1<<18) + 5];
int main(){
	int n;
	cin >> n;
	REP(i,n) REP(j,n) cin >> arr[i][j];
	SET(dp,0);
	//REP(i,n) dp[i][1<<i] = 1;
	dp[(1<<n)-1]=1;

	RFOR(mask,(1<<n)-1,0)
	{
		int count = 0;
		REP(l1,n) if(mask & (1<<l1))
		REP(l2,l1) if(mask & (1<<l2)) count++;

		REP(l1,n) if(mask & (1<<l1))
		REP(l2,l1) if (mask & (1<<l2))
		{
			//dp[l1][mask] +=  1.0 / (count) * arr[l1][l2] * dp[l1][mask ^ (1<<l2)];
			//dp[l2][mask] +=  1.0 / (count) * arr[l2][l1] * dp[l2][mask ^ (1<<l1)];
			dp[mask^(1<<l1)] += dp[mask]*arr[l2][l1]/count;
			dp[mask^(1<<l2)] += dp[mask]*arr[l1][l2]/count;
		}
	}
	REP(i,n-1) printf("%lf ", dp[1<<i]);
	printf("%lf\n", dp[1<<(n-1)]);
	return 0;
}


#include <vector>
#include <iostream>
#include<cstdio>
#include<cmath>
#include<algorithm>
#include<string.h>
#include<queue>
#include <set>
#include<map>
#include<string>

using namespace std;
template <class T> void show(T a, int n) { for (int i = 0; i < n; ++i) cout << a[i] << ' '; cout << endl; }
template <class T> void show(T a, int r, int l) { for (int i = 0; i < r; ++i) show(a[i], l); cout << endl; }
#define max(a, b) (a > b?a:b)
#define min(a, b) (a < b?a:b)

#define MS(a, v)    memset(a, v, sizeof(a))
#define pb push_back

typedef long long LL;

const int N = 128 * 2;
const int M = 5000;
const int oo = 10000 * 10000 * 10;

inline int cal2(int n)
{
    if( n < 1 ) return 0;
    return n * ( n - 1 ) / 2;
}

inline int low(int x)
{
    return x & ( x ^ ( x - 1 ) );
}
inline int bits(int x)
{
    int ans = 0;
    while(x )
    {
        x -= low(x);
        ++ans;
    }
    return ans;
}

int n, m;
double g[N][N];
double dp[N];

void solve()
{
    int i, j, k;
    m = 1<<n;
    dp[m - 1] = 1;
    for(int s = m - 2; s >= 1;--s)
    {
        dp[s] = 0;
        int fn = bits(s);
        for(i = 0; i < n;++i)
        {
            if( ( s & ( 1<<i ) ) == 0 )
                continue;
            for(j = 0;j < n;++j)
            {
                if( ( s & ( 1<<j ) ) )
                    continue;
                int ts = s ^ (1<<j);
                dp[s] += dp[ts] * g[i][j] / cal2(fn + 1);
            }
        }
    }
    for(i = 0; i < n;++i)
    {
        if( i )
            printf(" ");
        printf("%0.10f", dp[1<<i]);
    }
}

int main()
{
//        freopen("in", "r", stdin);
//        freopen("out1","w",stdout);
    int i, j, cas = 0;
    scanf("%d", &n);
    for(i = 0; i < n;++i)
        for(j = 0;j < n;++j)
            scanf("%lf", &g[i][j]);

    solve();

    return 0;
}


#include <vector>
#include <iostream>
#include<cstdio>
#include<cmath>
#include<algorithm>
#include<string.h>
#include<queue>
#include <set>
#include<map>
#include<string>

using namespace std;
template <class T> void show(T a, int n) { for (int i = 0; i < n; ++i) cout << a[i] << ' '; cout << endl; }
template <class T> void show(T a, int r, int l) { for (int i = 0; i < r; ++i) show(a[i], l); cout << endl; }
#define max(a, b) (a > b?a:b)
#define min(a, b) (a < b?a:b)

#define MS(a, v)    memset(a, v, sizeof(a))
#define pb push_back

typedef long long LL;

const int N = 19;
const int M = 5000;
const int oo = 10000 * 10000 * 10;

inline int cal2(int n)
{
    if( n < 1 ) return 0;
    return n * ( n - 1 ) / 2;
}

inline int low(int x)
{
    return x & ( x ^ ( x - 1 ) );
}
inline int bits(int x)
{
    int ans = 0;
    while(x )
    {
        x -= low(x);
        ++ans;
    }
    return ans;
}

int n, m;
double g[N][N];
double dp[1<<N];

void solve()
{
    int i, j, k;
    m = 1<<n;
    dp[m - 1] = 1;
    for(int s = m - 2; s >= 1;--s)
    {
        dp[s] = 0;
        int fn = bits(s);
        for(i = 0; i < n;++i)
        {
            if( ( s & ( 1<<i ) ) == 0 )
                continue;
            for(j = 0;j < n;++j)
            {
                if( ( s & ( 1<<j ) ) )
                    continue;
                int ts = s ^ (1<<j);
                dp[s] += dp[ts] * g[i][j] / cal2(fn + 1);
            }
        }
    }
    for(i = 0; i < n;++i)
    {
        if( i )
            printf(" ");
        printf("%0.10f", dp[1<<i]);
    }
}

int main()
{
//        freopen("in", "r", stdin);
//        freopen("out1","w",stdout);
    int i, j, cas = 0;
    scanf("%d", &n);
    for(i = 0; i < n;++i)
        for(j = 0;j < n;++j)
            scanf("%lf", &g[i][j]);

    solve();

    return 0;
}


#include <iostream>

using namespace std;

int n;
double a[20][20];

double p[1 << 18];

double calc(int mask)
{
    if (p[mask] > -0.5) return p[mask];

    p[mask] = 0.0;
    double bits = 1.0;
    for (int i = 0; i < n; i ++)
        if ((mask & (1 << i)) != 0) bits += 1.0;
    bits *= (bits - 1.0) / 2.0;
    for (int i = 0; i < n; i ++)
        for (int j = 0; j < n; j ++)
            if ((mask & (1 << i)) != 0 && (mask & (1 << j)) == 0)
                p[mask] += calc(mask | (1 << j)) * a[i][j] / bits;
    return p[mask];
}

int main()
{
    scanf("%d", &n);
    for (int i = 0; i < n; i ++)
        for (int j = 0; j < n; j ++)
            scanf("%lf", &a[i][j]);

    for (int i = 0; i < (1 << n); i ++)
        p[i] = -1.0;
    p[(1 << n) - 1] = 1.0;
    for (int i = 0; i < n; i ++)
        printf("%.10lf ", calc(1 << i));
    return 0;
}


/*
* Author : Hakobyan Tigran
*/

#pragma comment(linker, "/STACK:60777216")
#define printTime(begin, end) printf("%.3lf\n", (double)(end - begin) / (double)CLOCKS_PER_SEC)

#include <string>
#include <vector>
#include <cstdio>
#include <cstdlib>
#include <string>
#include <cmath>
#include <algorithm>
#include <vector>
#include <list>
#include <map>
#include <set>
#include <queue>
#include <stack>
#include <utility>
#include <functional>
#include <complex>
#include <iostream>
#include <fstream>
#include <sstream>
#include <bitset>
#include <limits>
#include <ctime>
#include <cassert>

using namespace std;

#define EPS 1e-9
#define PI acos(-1.0)
#define MOD 10007
#define IINF 10000000
#define LINF 1000000000000000000LL

#define mp(a, b) make_pair(a, b)
#define det(a, b, c, d) (a * d - c * b)
#define sbstr(s, i, j) s.substr(i, j - i + 1)

#define CLEAR(dp) memset(dp, -1, sizeof(dp))
#define reset(arr) memset(arr, 0, sizeof(arr))

double p[18][18];
double dp[1 << 18];

int main () {
    int n;
    scanf("%d", &n);
    for(int i = 0; i < n; ++i) {
        for(int j = 0; j < n; ++j) {
            scanf("%lf", &p[i][j]);
        }
    }
    dp[(1 << n) - 1] = 1.0;
    for(int mask = (1 << n) - 1; mask > 0; --mask) {
        int curr = mask, cnt = 0;
        while(curr > 0) {
            if(curr & 1) {
                cnt++;
            }
            curr >>= 1;
        }
        double mult = 1.0 / (1.0 * (cnt * (cnt - 1)) * 1.0 / 2.0);
        for(int i = 0; i < n; ++i) {
            for(int j = i + 1; j < n; ++j) {
                if((mask & (1 << i)) && (mask & (1 << j))) {
                    dp[mask ^ (1 << j)] += mult * p[i][j] * dp[mask];
                    dp[mask ^ (1 << i)] += mult * p[j][i] * dp[mask];
                }
            }
        }
    }
    for(int i = 0; i < n; ++i) {
        printf("%.9lf ", dp[1 << i]);
    }
    return 0;
}


#include <iostream>
#include <vector>
#include <algorithm>
#include <cstdio>
using namespace std;

#define two(x) (1<<x)
#define dump(x) cerr<<#x<<" = "<<(x)<<endl;

const int N=20;
double dp[(1<<18)+10];
double mat[N][N];
int n;

double scdp(int cur)
{
	if(cur==two(n)-1) return dp[two(n)-1]=1;
	if(dp[cur]!=-1) return dp[cur];

	double c=0;
	for(int i=0 ;i<n ;i++) if(two(i)&cur) c++;
	c=c*(c+1)/2;

	double& ret=dp[cur]=0;
	for(int i=0 ;i<n ;i++) if( !((two(i)&cur)) )
		for(int j=0 ;j<n ;j++) if( two(j)&cur )
			ret+=scdp( cur|two(i) )*mat[j][i]/c;

	return ret;
}

int main()
{
	//freopen("in.txt","r",stdin);

	while(scanf("%d",&n)==1)
	{
		for(int i=0 ;i<n ;i++) for(int j=0 ;j<n ;j++) cin>>mat[i][j];

		for(int i=0 ;i<two(n) ;i++) dp[i]=-1;//type double cant use function of "memset"
		for(int i=0 ;i<n ;i++)
		{
			printf("%.6f",scdp(two(i)));
			if(i==n-1) puts("");
			else putchar(' ');
		}
	}
}


#include <stdio.h>
#include <stdlib.h>
#include <math.h>
#include <string.h>
#include <vector>
#include <queue>
#include <stack>
#include <deque>
#include <map>
#include <set>
#include <string>
#include <algorithm>
#include <iostream>
using namespace std;

double dp[1<<18];
double g[20][20];

int main()
{

    int i, j, k, n, m[20], c;
    double curv;
    scanf("%d", &n);
    for(i=0; i<n; i++)
        for(j=0; j<n; j++)
            scanf("%lf", &g[i][j]);
    dp[0]=1.;
    for(k=0; k<(1<<n); k++)
    {
        for(i=c=0; i<n; i++)
            if (!(k&(1<<i))) m[c++]=i;
        curv=2./(double)(c*(c-1));
        for(i=0; i<c; i++)
            for(j=i+1; j<c; j++)
            {
                dp[k|(1<<m[i])]+=g[m[j]][m[i]]*curv*dp[k];
                dp[k|(1<<m[j])]+=g[m[i]][m[j]]*curv*dp[k];
            }
    }
    for(i=0; i<n; i++)
        printf("%.9lf ", dp[((1<<n)-1)^(1<<i)]);
}


#include <fstream>
#include <vector>
#include <map>

using namespace std;

#ifdef ONLINE_JUDGE
#include <iostream>
#else
ifstream cin("input.txt");
ofstream cout("output.txt");
#endif

int n;
double p[100][100], dp[1<<18];
int bc[1<<20];
vector<vector<int> > level;

#define elmask(i) (1<<i)

void work(int mask)
{
	for(int i = 0; i < n; i++)
		for(int j = 0; j < n; j++)
			if(i != j && (mask&elmask(i)) && (mask&elmask(j)))
				dp[mask &~ elmask(j)] += dp[mask]*p[i][j]/(bc[mask]*(bc[mask]-1)/2.0);
}

int main()
{
	cin >> n;
	level.resize(n+1);
	for(int i = 1; i < (1<<n); i++)
	{
		bc[i] = bc[i>>1]+(i&1);
		level[bc[i]].push_back(i);
	}
	for(int i = 0; i < n; i++)
		for(int j = 0; j < n; j++)
			cin >> p[i][j];
	dp[(1<<n)-1] = 1;
	for(int i = n; i >= 2; i--)
		for(int j = 0; j < level[i].size(); j++)
			work(level[i][j]);
	cout.setf(ios::fixed);
	cout.precision(9);
	for(int i = 0; i < n; i++)
		cout << dp[elmask(i)] << ' ';
}


#include <iostream>

using namespace std;

#ifdef ONLINE_JUDGE
//#include <iostream>
#else
//ifstream cin("input.txt");
//ofstream cout("output.txt");
#endif

int n, bc[1<<20], full;
double p[100][100], d[1<<18];

inline void work(int m)
{
	double h = d[m], c = 2.0/(bc[m]*(bc[m]-1));
	for(int i = 0; i < n; i++)
		for(int j = 0; j < n; j++)
			if(i != j && (m&(1<<i)) && (m&(1<<j)))
				d[m&~(1<<j)] += h*p[i][j]*c;
}

int main()
{
	scanf("%d",&n);
	full = (1<<n)-1;
	for(int i = 1; i <= full; i++)
		bc[i] = bc[i>>1]+(i&1);
	for(int i = 0; i < n; i++)
		for(int j = 0; j < n; j++)
			scanf("%lf",&(p[i][j]));
			//cin >> p[i][j];
	d[full] = 1;
	for(int i = full; i > 0; i--)
			work(i);
	for(int i = 0; i < n; i++)
		printf("%lf ",d[1<<i]);
}


#pragma comment(linker,"/STACK:300000000")
#define _CRT_SECURE_NO_WARNINGS

#include <iostream>
#include <vector>
#include <string>
#include <algorithm>
#include <cmath>
#include <map>
#include <set>
#include <iomanip>
#include <memory.h>
#include <cstdio>
#include <sstream>
#include <deque>
#include <bitset>
#include <numeric>
#include <ctime>

using namespace std;

#define show(x) cout << #x << " = " << (x) << endl;
#define fori(i,n) for(int i = 0; i < (n); i++)
#define forn(i,n) for(int i = 1; i <= (n); i++)
#define forab(i,a,b) for(int i = (a); i <= (b); i++)
#define sz(v) ((int)(v).size())
#define all(v) (v).begin(),(v).end()
const double pi = 3.1415926535897932384626433832795;
template<class T> T abs(T &a) { return a >= 0 ? a : -a; };
template<class T> T sqr(T &x) { return x * x; }
typedef pair<int,int> ii;
typedef long long ll;
///////////////////////////////////////

double a[20][20];
int n;
double dp[1<<20];

__int32 main()
{
#ifndef ONLINE_JUDGE
    freopen("input.txt","r",stdin);
    freopen("output.txt","w",stdout);
#endif
    cin >> n;
    fori(i,n)
        fori(j,n)
            cin >> a[i][j];
    dp[(1<<n)-1] = 1;
    for(int mask = (1<<n)-1; mask > 0; mask--)
    {
        int cnt = 0;
        fori(i,n)
            if(mask&(1<<i))
                cnt++;
        fori(i,n)
            if(mask&(1<<i))
                for(int j = i+1; j < n; j++)
                    if(mask&(1<<j))
                    {
                        dp[mask&~(1<<j)] += dp[mask]*a[i][j]/(cnt*(cnt-1)/2);
                        dp[mask&~(1<<i)] += dp[mask]*a[j][i]/(cnt*(cnt-1)/2);
                    }
    }
    cout.setf(ios::fixed);
    cout.precision(9);
    fori(i,n)
        cout << dp[1<<i] << ' ';
}


#include <fstream>

using namespace std;

#ifdef ONLINE_JUDGE
#include <iostream>
#else
ifstream cin("input.txt");
ofstream cout("output.txt");
#endif

int n, bc[1<<20], full;
double p[100][100], d[1<<18];

inline void work(int m)
{
	double h = d[m], c = 2.0/(bc[m]*(bc[m]-1));
	for(int i = 0; i < n; i++)
		for(int j = 0; j < n; j++)
			if(i != j && (m&(1<<i)) && (m&(1<<j)))
				d[m&~(1<<j)] += h*p[i][j]*c;
}/**/

int main()
{
	scanf("%d",&n);
	full = (1<<n)-1;
	for(int i = 1; i <= full; i++)
		bc[i] = bc[i>>1]+(i&1);
	for(int i = 0; i < n; i++)
		for(int j = 0; j < n; j++)
			scanf("%f",&(p[i][j]));
	d[full] = 1;
	for(int i = full; i > 0; i--)
			work(i);
	for(int i = 0; i < n; i++)
		printf("%f ",d[1<<i]);
}


#include <fstream>

using namespace std;

#ifdef ONLINE_JUDGE
#include <iostream>
#else
ifstream cin("input.txt");
ofstream cout("output.txt");
#endif

int n, bc[1<<20], full;
double p[100][100], d[1<<18];

/*void work(int m)
{
	for(int i = 0; i < n; i++)
		for(int j = 0; j < n; j++)
			if(i != j && (m&(1<<i)) && (m&(1<<j)))
				d[m&~(1<<j)] += d[m]*p[i][j]/(bc[m]*(bc[m]-1)/2.0);
}/**/

void work(int m)
{
	double h = d[m], c = 2.0/(bc[m]*(bc[m]-1));
	for(int i = 0; i < n; i++)
		for(int j = 0; j < n; j++)
			if(i != j && (m&(1<<i)) && (m&(1<<j)))
				d[m&~(1<<j)] += h*p[i][j]*c;
}/**/

int main()
{
	cin >> n;
	full = (1<<n)-1;
	for(int i = 1; i <= full; i++)
		bc[i] = bc[i>>1]+(i&1);
	for(int i = 0; i < n; i++)
		for(int j = 0; j < n; j++)
			cin >> p[i][j];
	d[full] = 1;
	for(int i = full; i > 0; i--)
			work(i);
	for(int i = 0; i < n; i++)
		cout << d[1<<i] << ' ';
}


#include <iostream>

using namespace std;

#ifdef ONLINE_JUDGE
//#include <iostream>
#else
//ifstream cin("input.txt");
//ofstream cout("output.txt");
#endif

int n, bc[1<<20], full;
double p[100][100], d[1<<18];

inline void work(int m)
{
	double h = d[m], c = 2.0/(bc[m]*(bc[m]-1));
	for(int i = 0; i < n; i++)
		for(int j = 0; j < n; j++)
			if(i != j && (m&(1<<i)) && (m&(1<<j)))
				d[m&~(1<<j)] += h*p[i][j]*c;
}

int main()
{
	scanf("%d",&n);
	full = (1<<n)-1;
	for(int i = 1; i <= full; i++)
		bc[i] = bc[i>>1]+(i&1);
	for(int i = 0; i < n; i++)
		for(int j = 0; j < n; j++)
			scanf("%lf",&(p[i][j]));
			//cin >> p[i][j];
	d[full] = 1;
	for(int i = full; i > 0; i--)
			work(i);
	for(int i = 0; i < n; i++)
		printf("%lf",d[1<<i]);
}


#include <iostream>
#include <intrin.h>

using namespace std;

#ifdef ONLINE_JUDGE
//#include <iostream>
#else
//ifstream cin("input.txt");
//ofstream cout("output.txt");
#endif

int n, bc[1<<20], full;
double p[100][100], d[1<<18];

inline void work(int m)
{
	__popcnt(m);
	double h = d[m], c = 2.0/(bc[m]*(bc[m]-1));
	for(int i = 0; (1<<i) < m; i++)
		for(int j = i+1; (1<<j) <= m; j++)
			if((m&(1<<i)) && (m&(1<<j)))
			{
				d[m&~(1<<j)] += h*p[i][j]*c;
				d[m&~(1<<i)] += h*p[j][i]*c;
			}
}

int main()
{
	scanf("%d",&n);
	full = (1<<n)-1;
	for(int i = 1; i <= full; i++)
		bc[i] = bc[i>>1]+(i&1);
	for(int i = 0; i < n; i++)
		for(int j = 0; j < n; j++)
			scanf("%lf",&(p[i][j]));
			//cin >> p[i][j];
	d[full] = 1;
	for(int i = full; i > 0; i--)
			work(i);
	for(int i = 0; i < n; i++)
		printf("%lf ",d[1<<i]);
}


#include <iostream>

using namespace std;

#ifdef ONLINE_JUDGE
//#include <iostream>
#else
//ifstream cin("input.txt");
//ofstream cout("output.txt");
#endif

int n, bc[1<<20], full;
double p[100][100], d[1<<18];

inline void work(int m)
{
	double h = d[m], c = 2.0/(bc[m]*(bc[m]-1));
	for(int i = 0; (1<<i) < m; i++)
		for(int j = i+1; (1<<j) <= m; j++)
			if((m&(1<<i)) && (m&(1<<j)))
			{
				d[m&~(1<<j)] += h*p[i][j]*c;
				d[m&~(1<<i)] += h*p[j][i]*c;
			}
}

int main()
{
	scanf("%d",&n);
	full = (1<<n)-1;
	for(int i = 1; i <= full; i++)
		bc[i] = bc[i>>1]+(i&1);
	for(int i = 0; i < n; i++)
		for(int j = 0; j < n; j++)
			scanf("%lf",&(p[i][j]));
			//cin >> p[i][j];
	d[full] = 1;
	for(int i = full; i > 0; i--)
			work(i);
	for(int i = 0; i < n; i++)
		printf("%lf ",d[1<<i]);
}


#include <algorithm>
#include <vector>
#include <iostream>
#include <string>
#include <random>
#include <set>
#include <stack>
#include <map>
#include <fstream>

using namespace std;
#define ll long long
const int MOD = 1000000007;
const double PI = 3.141592653528;
const int INF = 1000000000;
/*
#define cin in
#define cout out
ifstream in("input.txt");
ofstream out("output.txt");
/**/

double a[123][123];
double dp[(1<<19) + 2];
int main()
{
	ios_base::sync_with_stdio(0);
	cin.tie(0);

	int n;
	cin >> n;
	for(int i = 0; i < n; ++i)
		for(int j = 0; j < n; ++j)
			cin >> a[i][j];
	dp[(1<<n) - 1] = 1;
	for(int i = (1<<n) - 1; i >= 1; --i)
	{
		vector<int> dead, alive;
		for(int j = 0; j < n; ++j)
		{
			if(!(i & (1<<j)))
				dead.push_back(j);
			else
				alive.push_back(j);
		}
		if(alive.size() == 1)
			continue;
		/*int t = 0;
		for(int j = 0; j < alive.size(); ++j)
			for(int k = 0; k < alive.size(); ++k)
				if(a[alive[k]][alive[j]] > 0 && j != k)
					++t;*/
		for(int j = 0; j < alive.size(); ++j)
		{
			for(int k = 0; k < alive.size(); ++k)
			{
				if(a[alive[k]][alive[j]] > 0 && j != k)
				{
					int mask = (i ^ (1<<alive[j]));
					dp[mask] += dp[i] * a[alive[k]][alive[j]] / (alive.size() * (alive.size() - 1) / 2) ;
				}
			}
		}
	}
	cout.precision(12);
	for(int i = 0; i < n; ++i)
		cout << min(dp[1<<i], 1.) << " ";

	return 0;
}
/*

2
0.5 0.5
0.5 0.5

3
0 0.5 0.5
0.5 0 0.5
0.5 0.5 0

*/


#include <algorithm>
#include <vector>
#include <iostream>
#include <string>
#include <random>
#include <set>
#include <stack>
#include <map>
#include <fstream>

using namespace std;
#define ll long long
const int MOD = 1000000007;
const double PI = 3.141592653528;
const int INF = 1000000000;
/*
#define cin in
#define cout out
ifstream in("input.txt");
ofstream out("output.txt");
/**/

double a[123][123];
double dp[(1<<19) + 2];
int main()
{
	ios_base::sync_with_stdio(0);
	cin.tie(0);

	int n;
	cin >> n;
	for(int i = 0; i < n; ++i)
		for(int j = 0; j < n; ++j)
			cin >> a[i][j];
	dp[(1<<n) - 1] = 1;
	for(int i = (1<<n) - 2; i >= 1; --i)
	{
		vector<int> dead, alive;
		for(int j = 0; j < n; ++j)
		{
			if(!(i & (1<<j)))
				dead.push_back(j);
			else
				alive.push_back(j);
		}
		for(int j = 0; j < dead.size(); ++j)
			for(int k = 0; k < alive.size(); ++k)
				dp[i] += dp[i | (1<<dead[j])] * a[alive[k]][dead[j]];
	}
	cout.precision(12);
	for(int i = 0; i < n; ++i)
		cout << min(dp[1<<i], 1.) << " ";

	return 0;
}


#include <iostream>
#include <cstring>

using namespace std;

double dp[1 << 18];
double p[18][18];
int fish[18];
int n;
double ret;

double solve(int i, int mask, int k) {
    if(dp[mask] >= 0) return dp[mask];
    if(k == 1) return dp[mask] = 1;
    double met = 2.0/(k*(k-1.0));
    //printf("met %lf \n", met);
    dp[mask] = 0;
    for(int j = 0; j < n; j++)
        if((((mask >> j) & 1) == 1) && (i != j)) dp[mask] += met * p[i][j] * solve(i, mask ^ (1 << j), k-1);
    for(int j = 0; j < n; j++) {
        if((((mask >> j) & 1) == 1) && (j != i)) {
            for(int r = j + 1; r < n; r++) {
                if((((mask >> r) & 1) == 1) && (r != i)) {
                    dp[mask] += met * p[j][r] * solve(i, mask ^ (1 << r), k - 1);
                    dp[mask] += met * p[r][j] * solve(i, mask ^ (1 << j), k - 1);
                }
            }
        }
    }
    //printf("mask %d dp[mask] %lf\n", mask, dp[mask]);
    return dp[mask];
}

int main() {
    scanf("%d", &n);
    for(int i = 0; i < n; i++)
        for(int j = 0; j < n; j++)
            scanf("%lf", &p[i][j]);
    for(int i = 0; i < n; i++) {
        //printf("Fish # %d\n", i + 1);
        memset(dp, -1, sizeof dp);
        ret = solve(i, (1 << n) - 1, n);
        printf("%.8lf", ret);
        if(i != n - 1) printf(" ");
    }
}


//#pragma linker("/STACK:134217728")

#include <cstdio>  // need for the freopen func.
#include <cstddef> // for ::std::size_T

#include <iostream>  // for ::std::cout
#include <iomanip>
#include <vector>    // for ::std::vector
#include <string>    // for ::std::string
#include <algorithm> // for algorithms
#include <queue>     // for  ::std::queue
#include <set>       // for  ::std::set
#include <utility>
#include <numeric>
#include <cmath>

int gcd(int x, int y)
{
	while (y > 0)
	{
		int m = x % y;
		x = y;
		y = m;
	}
	return x;
}

int main(int argc, char* argv[])
{

#ifndef ONLINE_JUDGE
	freopen("input.txt", "r", stdin);
	freopen("output.txt", "w", stdout);
#endif

	::std::ios::sync_with_stdio(false);
	using  ::std::cout;
	using  ::std::cin;
	using  ::std::vector;
	using  ::std::string;
	using  ::std::pair;

	::std::size_t n;
	double a[32][32];
	vector<double> d;
	vector<double>ans;

	d.resize(1 << 18);
	int s[32] = { 0 };
	int ss = 0;

	cin >> n;

	ans.resize(n);

	for (size_t i = 0; i < n; ++i)
		for (size_t j = 0; j < n; ++j)
			cin >> a[i][j];

	d[(1 << n) - 1] = 1;
	for (size_t mask = (1 << n) - 1; mask > 0; --mask)
	{
		ss = 0;
		for (size_t i = 0; i < n;++i)
			if (mask & (1 << i))
				s[ss++] = i;

		if (ss == 1)
		{
			ans[s[0]] = d[mask];
		}
		else
		{
			double prob = 2.0 / (ss * (ss - 1) );
			for (size_t i = 0; i < ss - 1; ++i)
				for (size_t j = i + 1; j < ss; ++j)
				{
					d[mask ^ (1 << s[i])] += d[mask] * prob * a[s[j]][s[i]];
					d[mask ^ (1 << s[j])] += d[mask] * prob * a[s[i]][s[j]];
				}
		}
	}
	for (size_t i = 0; i < n;++i)
		cout << std::setprecision(12) << std::fixed << ans[i] << ' ';
	cout << '\n';

	return 0;
}


#include <stdio.h>
#include <sstream>
#include <iostream>
#include <string>
#include <algorithm>
#include <vector>
#include <list>
#include <iomanip>
#include <map>
#include <set>
#include <cmath>
#include <queue>
#include <cassert>
#include <ctime>
#include <numeric>
#include <string.h>
using namespace std;
#pragma comment(linker, "/STACK:20000000")

typedef vector<int> vi;
#define sz(a) int((a).size())
#define all(c) (c).begin(),(c).end()

string problem_name = "a";

void init(){
  freopen((problem_name+".in").c_str(),"rt",stdin);
 // freopen((problem_name+".out").c_str(),"wt",stdout);
}

double dp[1<<18];
double mas[20][20];
int n;
double go(int s,int c)
{
    if (s==((1<<n)-1)) return 1;
    if (dp[s]>-.1) return dp[s];
    double res=0;

    for (int i=0;i<n;i++) if ((1<<i)&s)
    for (int j=0;j<n;j++) if (((1<<j)&s)==0)
    {
        res+= go((1<<j)^s,c+1)*mas[i][j];
        res+= go((1<<j)^s,c+1)*(1-mas[j][i]);
    }

    return dp[s] = res/(c*(c+1));
}

int main()
{
    //init();

    //int n;
    scanf("%d",&n);

        for (int j=0;j<1<<n;j++)
            dp[j]=-1;

    for (int i=0;i<n;i++)
    for (int j=0;j<n;j++)
        scanf("%lf",&mas[i][j]);

    for (int i=0;i<n;i++)
        printf("%.6lf\n",go((1<<i),1));

  return 0;
}


#include <stdio.h>
#include <sstream>
#include <iostream>
#include <string>
#include <algorithm>
#include <vector>
#include <list>
#include <iomanip>
#include <map>
#include <set>
#include <cmath>
#include <queue>
#include <cassert>
#include <ctime>
#include <numeric>
#include <string.h>
using namespace std;
#pragma comment(linker, "/STACK:20000000")

typedef vector<int> vi;
#define sz(a) int((a).size())
#define all(c) (c).begin(),(c).end()

string problem_name = "a";

void init(){
  freopen((problem_name+".in").c_str(),"rt",stdin);
 // freopen((problem_name+".out").c_str(),"wt",stdout);
}

double dp[1<<18][18];
double mas[20][20];
int n;
double go(int s, int w, int c)
{
    if (c==1)
    {
        return (s>>w)&1;
    }
    if (dp[s][w]>-.1) return dp[s][w];
    double res=0;

    for (int i=0;i<n;i++) if ((1<<i)&s)
    for (int j=i+1;j<n;j++) if ((1<<j)&s)
    {
        res+= go((1<<j)^s,w,c-1)*mas[i][j];
        res+= go((1<<i)^s,w,c-1)*(1-mas[i][j]);
        return dp[s][w] = res;
        //  /(c*(c-1));
//      res+= go((1<<i)^s,w,c-1)*mas[j][i];
        //res+= go((1<<j)^s,w,c-1)*(1-mas[j][i]);
    }

    return res;

}

int main()
{
  //  init();

    //int n;
    scanf("%d",&n);
    for (int i=0;i<n;i++)
        for (int j=0;j<1<<n;j++)
            dp[j][i]=-1;

    for (int i=0;i<n;i++)
    for (int j=0;j<n;j++)
        scanf("%lf",&mas[i][j]);

    for (int i=0;i<n;i++)
        printf("%.6lf\n",go((1<<n)-1,i,n));

  return 0;
}