#include <bits/stdc++.h>
#define endl '\n'
//#pragma GCC optimize ("O3")
//#pragma GCC target ("sse4")
using namespace std;
template<class T, class T2> inline int chkmax(T &x, const T2 &y) { return x < y ? x = y, 1 : 0; }
template<class T, class T2> inline int chkmin(T &x, const T2 &y) { return x > y ? x = y, 1 : 0; }
const int MAXN = (1 << 20);
int n;
int a[MAXN];
void read()
{
cin >> n;
for(int i = 0; i < n; i++)
cin >> a[i];
}
void solve()
{
for(int i = 0; i < n; i++)
for(int j = 0; j < n; j++)
cout << a[i] * a[j] << " \n"[j == n - 1];
}
int main()
{
ios_base::sync_with_stdio(false);
cin.tie(NULL);
read();
solve();
return 0;
}
I2luY2x1ZGUgPGJpdHMvc3RkYysrLmg+CiNkZWZpbmUgZW5kbCAnXG4nCgovLyNwcmFnbWEgR0NDIG9wdGltaXplICgiTzMiKQovLyNwcmFnbWEgR0NDIHRhcmdldCAoInNzZTQiKQoKdXNpbmcgbmFtZXNwYWNlIHN0ZDsKdGVtcGxhdGU8Y2xhc3MgVCwgY2xhc3MgVDI+IGlubGluZSBpbnQgY2hrbWF4KFQgJngsIGNvbnN0IFQyICZ5KSB7IHJldHVybiB4IDwgeSA/IHggPSB5LCAxIDogMDsgfQp0ZW1wbGF0ZTxjbGFzcyBULCBjbGFzcyBUMj4gaW5saW5lIGludCBjaGttaW4oVCAmeCwgY29uc3QgVDIgJnkpIHsgcmV0dXJuIHggPiB5ID8geCA9IHksIDEgOiAwOyB9CmNvbnN0IGludCBNQVhOID0gKDEgPDwgMjApOwoKaW50IG47CmludCBhW01BWE5dOwoKdm9pZCByZWFkKCkKewoJY2luID4+IG47Cglmb3IoaW50IGkgPSAwOyBpIDwgbjsgaSsrKQoJCWNpbiA+PiBhW2ldOwp9Cgp2b2lkIHNvbHZlKCkKewoJZm9yKGludCBpID0gMDsgaSA8IG47IGkrKykKCQlmb3IoaW50IGogPSAwOyBqIDwgbjsgaisrKQoJCQljb3V0IDw8IGFbaV0gKiBhW2pdIDw8ICIgXG4iW2ogPT0gbiAtIDFdOwp9CgppbnQgbWFpbigpCnsKCWlvc19iYXNlOjpzeW5jX3dpdGhfc3RkaW8oZmFsc2UpOwoJY2luLnRpZShOVUxMKTsKCglyZWFkKCk7Cglzb2x2ZSgpOwoJcmV0dXJuIDA7Cn0KCg==