#include <iostream>
#include <vector>
#include <cstdio>
#include <algorithm>
#include <string>
#include <ctime>

using namespace std;

const int EPS = 0;

vector<int> gauss(vector<vector<int> > a, vector<int> b)
{
	int n = b.size();
	for (int j = 0; j < n; j++)
	{
		int z = j;
		for (int i = j; i < n; i++)
			if (abs(a[i][j]) > abs(a[z][j]))
				z = i;
		swap(a[j], a[z]), swap(b[j], b[z]);
		if (fabs(a[j][j]) < EPS) continue;
		for (int k = 0; k < n; k++)
		{
			if (k == j) continue;
			for (int i = 0; i < n; i++)
			{
				if (i == j) continue;
				a[i][k] -= a[i][j] * a[j][k] / a[j][j];
			}
		}
		for (int i = 0; i < n; i++)
		{
			if (i == j) continue;
			b[i] -= a[i][j] * b[j] / a[j][j];
			a[i][j] = 0;
		}
	}
	for (int i = 0; i < n; i++)
		if (abs(a[i][i]) < EPS) b[i] = 0;
		else b[i] /= a[i][i];
	return b;
};

int main()
{
//	srand(1124924545223ll);
    int n;
    cin >> n;
    vector<vector<int> > a(n, vector<int>(n));
    vector<int> b(n);
    for (int i = 0; i < n; i++)
    {
    	for (int j = 0; j < n; j++)
    		a[i][j] = (rand() % 2 == 0) ? -1 : 1;
    	for (int j = 0; j < n; j++)
    		cout << ((a[i][j] < 0) ? '-' : '+') << (j == n - 1 ? '\n' : ' ');
       	cout.flush();
       	cin >> b[i];
    }
    vector<int> ans = gauss(a, b);
    cout << "answer: ";
	for (int i = 0; i < n; i++)
		cout << ans[i] << (i == n - 1 ? '\n' : ' ');
    cout.flush();
    return 0;	
}
