#include <bits/stdc++.h>
using namespace std;
int a[101][101];
int n;
int ok;
void dfs(int s, int sum, int l) {
  if (s == n) {
    double temp = sqrt(sum);
    if (temp == floor(temp)) ok = 1;
    return;
  }
  for (int i = 1; i <= l && ok == 0; ++i) {
    a[n][s] = i;
    dfs(s + 1, sum + i * i, i);
  }
  return;
}
int main() {
  for (n = 1; n <= 100; ++n) {
    ok = 0;
    dfs(0, 0, 10000000);
  }
  int m;
  while (~scanf("%d%d", &n, &m)) {
    for (int i = 0; i < n; ++i) {
      for (int j = 0; j < m; ++j) printf("%d ", a[n][i] * a[m][j]);
      puts("");
    }
  }
}
