#include <bits/stdc++.h>
using namespace std;
vector<int> a, b;
int x, M;
vector<int> vec(int N) {
  vector<int> ret;
  if (N == 2) {
    ret.push_back(3);
    ret.push_back(4);
  } else if (N == 1) {
    ret.push_back(1);
  } else if (N % 2 == 0) {
    for (int i = 1; i < N; ++i) {
      ret.push_back(1);
    }
    ret.push_back((N - 2) / 2);
  } else if (N % 2 == 1) {
    for (int i = 1; i < N - 1; ++i) {
      ret.push_back(1);
    }
    ret.push_back(2);
    ret.push_back((N + 1) / 2);
  }
  return ret;
}
int main() {
  cin >> x >> M;
  a = vec(x);
  b = vec(M);
  for (int i = 0; i < x; ++i) {
    for (int j = 0; j < M; ++j) {
      cout << a[i] * b[j] << " ";
    }
    cout << "\n";
  }
  return 0;
}
