#include <bits/stdc++.h>
#pragma comment(linker, "/STACK:16777216")
using namespace std;
bool isSquare(int r) {
  return int(sqrt((double)r)) * int(sqrt((double)r)) == r;
}
bool check(int a, int b, int c, int d, int N, int M) {
  int ans = 0;
  ans += isSquare(a * a * (M - 1) + b * b);
  ans += isSquare(a * a * (N - 1) + c * c);
  ans += isSquare(b * b * (N - 1) + d * d);
  ans += isSquare(c * c * (M - 1) + d * d);
  return ans == 4;
}
int _127 = 100;
int main() {
  int N, M;
  cin >> N >> M;
  int a, b, c, d;
  do {
    a = 1 + (rand() % _127);
    b = 1 + (rand() % _127);
    c = 1 + (rand() % _127);
    d = 1 + (rand() % _127);
  } while (!check(a, b, c, d, N, M));
  for (long long i = 0; i < (int)N - 1; i++) {
    for (long long j = 0; j < (int)M - 1; j++) {
      cout << a << " ";
    }
    cout << b << endl;
  }
  for (long long j = 0; j < (int)M - 1; j++) {
    cout << c << " ";
  }
  cout << d << endl;
  return 0;
}
