#include <bits/stdc++.h>
using namespace std;
const int INF = 0x3f3f3f3f;
const double eps = 1e-4;
long long sum[105][105];
int sq(long long a) {
  if (a == (long long)sqrt(a) * (long long)sqrt(a))
    return 1;
  else
    return 0;
}
int main() {
  int n, m;
  scanf("%d%d", &n, &m);
  long long a, b, c, d;
  n -= 1;
  m -= 1;
  long long temp1, temp2, temp3, temp4;
  for (a = 1; a < 100; a++)
    for (b = 1; b < 100; b++)
      for (c = 1; c < 100; c++)
        for (d = 1; d < 100; d++) {
          temp1 = m * a * a + b * b;
          temp2 = n * a * a + c * c;
          temp3 = n * b * b + d * d;
          temp4 = m * c * c + d * d;
          if (sq(temp1) == 1 && sq(temp2) == 1 && sq(temp3) == 1 &&
              sq(temp4) == 1)
            goto output;
        }
output:
  for (int i = 0; i < n; i++) {
    for (int j = 0; j < m; j++) printf("%lld ", a);
    printf("%lld\n", b);
  }
  for (int i = 0; i < m; i++) printf("%lld ", c);
  printf("%lld\n", d);
  return 0;
}
