#include <bits/stdc++.h>
using namespace std;
vector<int> gen(int size) {
  vector<int> ans;
  if (size == 1) {
    ans.push_back(1);
  } else if (size == 2) {
    ans.push_back(3);
    ans.push_back(4);
  } else {
    for (int i = 0; i < size - 1; i++) ans.push_back(1);
    if (size % 2 == 0)
      ans.push_back(size / 2 - 1);
    else {
      ans[0] = 2;
      ans.push_back(size / 2 + 1);
    }
  }
  return ans;
}
int main() {
  int n, m;
  scanf("%d%d", &n, &m);
  vector<int> line = gen(n);
  vector<int> row = gen(m);
  for (int i = 0; i < n; i++) {
    for (int j = 0; j < m; j++) printf("%d ", line[i] * row[j]);
    printf("\n");
  }
  return 0;
}
