#include <vector>
#include <algorithm>
#include <queue>
#include <map>
#include <set>
#include <unordered_map>
#include <time.h>
#include <iomanip>
#include <deque>
#include <math.h>
#include <cmath>
#include <assert.h>
#include <stack>
#include <bitset>
using namespace std;
#include <fstream>
ifstream cin("gauss.in");
ofstream cout("gauss.out");
int n, m;
long double v[310][310];
int sp[310][310];
long double ans[310];
const long double eps = 1e-9;
bool exist(long double nr) {
return abs(nr) > eps;
}
void scade(int a, int b, long double cost) {
for (int j = 1; j <= m + 1; j++) {
v[a][j] -= v[b][j] * cost;
}
}
int main() {
ios::sync_with_stdio(false);
cin.tie(nullptr);
cout.tie(nullptr);
cin >> n >> m;
for (int i = 1; i <= n; i++) {
for (int j = 1; j <= m + 1; j++) {
cin >> v[i][j];
}
}
for (int j = 1; j <= m; j++) {
int pnt = j;
while (pnt <= n && !exist(v[pnt][j])) {
pnt++;
}
if (pnt == n + 1) continue;
if (pnt != j) {
for (int k = 1; k <= m + 1; k++) {
swap(v[j][k], v[pnt][k]);
}
}
for (int i = j + 1; i <= n; i++) {
if (exist(v[i][j])) {
long double factor = v[i][j] / v[j][j];
scade(i, j, factor);
}
}
}
for (int i = 1; i <= n; i++) {
for (int j = 1; j <= m; j++) {
sp[i][j] = sp[i][j - 1] + (exist(v[i][j]) ? 1 : 0);
}
}
for (int j = m; j >= 1; j--) {
int found = -1;
for (int i = 1; i <= n; i++) {
if (exist(v[i][j]) && sp[i][j] == 1) {
found = i;
break;
}
}
if (found != -1) {
ans[j] = v[found][m + 1] / v[found][j];
for (int i = 1; i <= n; i++) {
if (i != found && exist(v[i][j])) {
v[i][m + 1] -= v[i][j] * ans[j];
}
}
}
}
for (int i = 1; i <= n; i++) {
if (exist(v[i][m + 1])) {
bool allZero = true;
for (int j = 1; j <= m; j++) {
if (exist(v[i][j])) {
allZero = false;
break;
}
}
if (allZero) {
cout << "Impossible\n";
return 0;
}
}
}
for (int j = 1; j <= m; j++) {
cout << setprecision(15) << fixed << ans[j] << " ";
}
cout << '\n';
return 0;
}