#include <bits/stdc++.h>
using namespace std;
const int MAXN = 105;
int N, M;
int A[MAXN];
int ans[MAXN][MAXN];
void gen(int x) {
  if (x <= 2) {
    for (int i = 0; i < x; i++) {
      A[i] = 3 + i;
    }
    return;
  } else if (x == 3) {
    A[0] = 1;
    A[1] = A[2] = 2;
    return;
  }
  if (x % 2) {
    A[0] = x - 2;
    fill(A + 1, A + x, 2);
  } else {
    A[0] = x / 2 - 1;
    fill(A + 1, A + x, 1);
  }
}
int main() {
  if (fopen("input.txt", "r")) {
    freopen("input.txt", "r", stdin);
  }
  ios::sync_with_stdio(false);
  cin >> N >> M;
  gen(M);
  for (int i = 0; i < N; i++) {
    copy_n(A, M, ans[i]);
  }
  gen(N);
  for (int j = 0; j < M; j++) {
    for (int i = 0; i < N; i++) {
      ans[i][j] *= A[i];
    }
  }
  for (int i = 0; i < N; i++) {
    for (int j = 0; j < M; j++) {
      cout << ans[i][j] << ' ';
    }
    cout << '\n';
  }
}
