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