#include <bits/stdc++.h>
using namespace std;
void init(vector<int> &a) {
  if (a.size() == 1) a[0] = 1;
  if (a.size() == 2) {
    a[0] = 3;
    a[1] = 4;
  }
  if (a.size() > 2) {
    int k = 0;
    if (a.size() % 2 == 0) {
      a[0] = 1;
      k = 1;
    } else {
      a[0] = 2;
      k = 4;
    }
    for (int i = 1; i < a.size() - 1; i++) {
      a[i] = 1;
      k++;
    }
    for (int i = 1;; i++) {
      double d = sqrt((double)k + i * i);
      double d2 = fabs(d - (int)d);
      if (d2 < 1e-9) {
        a[a.size() - 1] = i;
        break;
      }
    }
  }
}
int main() {
  int n, m;
  scanf("%d%d", &n, &m);
  vector<int> a(n);
  vector<int> b(m);
  init(a);
  init(b);
  for (int i = 0; i < n; i++) {
    for (int j = 0; j < m; j++) {
      printf("%d ", a[i] * b[j]);
    }
    printf("\n");
  }
}
