/**
 * Sergey Kopeliovich (burunduk30@gmail.com)
 */

#include <bits/stdc++.h>

using namespace std;

#define forn(i, n) for (int i = 0; i < (int)(n); i++)

typedef long double T;
const T EPS = 1e-9;

int main() {
	int n, m = 0;
	cin >> n;
	vector<vector<T>> a(n, vector<T>(n + 1));
	vector<int> p(n);
	forn(_, n) {
		forn(j, n + 1)
			cin >> a[m][j];
		forn(i, m)
			if (abs(a[m][p[i]]) > EPS) {
				T coef = a[m][p[i]] / a[i][p[i]];
				forn(j, n + 1)
					a[m][j] -= a[i][j] * coef;
			}
		int j = 0;
		while (j <= n && abs(a[m][j]) < EPS)
			j++;
		if (j == n) {
			puts("impossible");
			return 0;
		}
		if (j < n) 
			p[m++] = j;
	}
	if (m < n) {
		puts("infinity");
		return 0;
	}
	puts("single");
	vector<T> x(n);
	for (int i = n - 1; i >= 0; i--) {
		int k = p[i];
		x[k] = a[i][n];
		for (int j = i + 1; j < n; j++)
			x[k] -= x[p[j]] * a[i][p[j]];
		x[k] /= a[i][k];
	}
	forn(i, n)
		printf("%.3lf ", (double)x[i]);
	puts("");
}