#include <bits/stdc++.h>
using namespace std;
vector<int> u, v;
const int maxn = 110;
int a[maxn][maxn];
void get(int n) {
  v.clear();
  if (n == 1) {
    v.push_back(1);
    return;
  }
  for (int i = 0; i < n - 1; i++) v.push_back(4);
  v.push_back(4 * (n - 1) - 1);
}
int main() {
  int n, m;
  cin >> n >> m;
  get(m);
  u = v;
  get(n);
  for (int i = 0; i < n; i++) {
    for (int j = 0; j < m; j++) cout << v[i] * u[j] << " ";
    cout << endl;
  }
  return 0;
}
