#include <bits/stdc++.h>
using namespace std;
vector<int> build(int n) {
  vector<int> a;
  a.push_back(0);
  if (n == 1)
    a.push_back(1);
  else if (n == 2) {
    a.push_back(3);
    a.push_back(4);
  } else if (n % 2 == 0) {
    for (int i = (1); i <= (n - 1); i++) a.push_back(1);
    a.push_back((n - 2) / 2);
  } else {
    a.push_back(2);
    for (int i = (2); i <= (n - 1); i++) a.push_back(1);
    a.push_back((n + 1) / 2);
  }
  return a;
}
int n, m, res[110][110];
int main() {
  ios::sync_with_stdio(0);
  cin.tie(NULL);
  cin >> n >> m;
  vector<int> a = build(n);
  vector<int> b = build(m);
  for (int i = (1); i <= (n); i++)
    for (int j = (1); j <= (m); j++) res[i][j] = a[i] * b[j];
  for (int i = (1); i <= (n); i++) {
    for (int j = (1); j <= (m); j++) cout << res[i][j] << " ";
    cout << endl;
  }
  return 0;
}
