#include <bits/stdc++.h>
using namespace std;
int n, m;
vector<long long> dim1(int n) {
  vector<long long> res;
  if (n == 1) {
    res.push_back(1);
    return res;
  }
  if (n == 2) {
    res.push_back(3);
    res.push_back(4);
    return res;
  }
  res.push_back(n - 2);
  for (int i = 0; i < (n - 1); i++) res.push_back(2);
  return res;
}
int main() {
  cin.tie(0);
  ios_base::sync_with_stdio(0);
  cin >> n >> m;
  vector<long long> row = dim1(n), col = dim1(m);
  for (int i = 0; i < (n); i++)
    for (int j = 0; j < (m); j++)
      cout << row[i] * col[j] << (j == m - 1 ? "\n" : " ");
}
