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