#include <bits/stdc++.h>
using namespace std;
int n, m;
vector<int> f(int n) {
  vector<int> a;
  if (n == 1) a.push_back(1);
  if (n == 2) {
    a.push_back(3);
    a.push_back(4);
  }
  if (n >= 3) {
    a.push_back(n - 2);
    for (int i = 1; i < n; i++) a.push_back(2);
  }
  return a;
}
int main() {
  scanf("%d%d", &n, &m);
  vector<int> a = f(n), b = f(m);
  for (int i = 0; i < n; i++)
    for (int j = 0; j < m; j++) printf("%d ", a[i] * b[j]);
  return 0;
}
