#include <bits/stdc++.h>
using namespace std;
int n, m;
void mo() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
}
void nhap() { cin >> n >> m; }
vector<int> get(int n) {
  vector<int> a(n);
  if (n == 1) {
    a[0] = 1;
    return a;
  } else if (n == 2) {
    a[0] = 3;
    a[1] = 4;
    return a;
  }
  if (n % 2 == 0) {
    for (int j = 0; j < n; j++) a[j] = 1;
    a[n - 1] = (n / 2) - 1;
  } else {
    for (int j = 0; j < n - 1; j++) a[j] = 1;
    a[n - 2] = 2;
    a[n - 1] = (n / 2) + 1;
  }
  return a;
}
void xuli() {
  vector<int> a = get(n);
  vector<int> b = get(m);
  for (int i = 0; i < n; i++)
    for (int j = 0; j < m; j++) {
      cout << a[i] * b[j];
      if (j < m - 1)
        cout << " ";
      else
        cout << "\n";
    }
}
int main() {
  mo();
  nhap();
  xuli();
}
