#include <bits/stdc++.h>
using namespace std;
int shu[3][110];
void suan(int ty, int num) {
  if (num == 1) {
    shu[ty][0] = 1;
    return;
  }
  if (num == 2) {
    shu[ty][0] = 3;
    shu[ty][1] = 4;
    return;
  }
  for (int i = 0; i < num - 1; i++) shu[ty][i] = 2;
  shu[ty][num - 1] = num - 2;
}
int main() {
  int n, m;
  cin >> n >> m;
  suan(1, n);
  suan(2, m);
  for (int i = 0; i < n; i++) {
    for (int j = 0; j < m; j++) {
      if (j == 0)
        cout << shu[1][i] * shu[2][j];
      else
        cout << " " << shu[1][i] * shu[2][j];
    }
    cout << endl;
  }
  return 0;
}
