#include <bits/stdc++.h>
using namespace std;
template <class T>
ostream& operator<<(ostream& cout, vector<T> V) {
  cout << "[ ";
  for (auto v : V) cout << v << ' ';
  return cout << ']';
}
template <class L, class R>
ostream& operator<<(ostream& cout, pair<L, R> P) {
  return cout << '(' << P.first << ',' << P.second << ')';
}
bool sq(long long int x) {
  long long int y = sqrt(x);
  if (y * y == x || (y + 1) * (y + 1) == x || (y - 1) * (y - 1) == x) return 1;
  return 0;
}
vector<long long int> gen(long long int n) {
  while (1) {
    vector<long long int> a(n);
    long long int ans = 0;
    for (long long int i = 0; i < (n); i++) {
      a[i] = rand() % 10000 + 1;
      ans += a[i] * a[i];
    }
    if (sq(ans)) return a;
  }
}
signed main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  long long int n;
  cin >> n;
  long long int m;
  cin >> m;
  vector<long long int> a = gen(n);
  vector<long long int> b = gen(m);
  for (long long int i = 0; i < (n); i++) {
    for (long long int j = 0; j < (m); j++) {
      cout << a[i] * b[j] << ' ';
    }
    cout << '\n';
  }
  cerr << "Time : " << 1000 * (long double)clock() / (long double)CLOCKS_PER_SEC
       << "ms\n";
  ;
}
