#include <bits/stdc++.h>
using namespace std;
const int N = 4e5 + 10;
int n, m;
bool chen(int a, int b) {
  int l, r;
  l = a * a * (n - 1) + b * b;
  r = sqrt(l);
  if (l == r * r) return true;
  return false;
}
bool chem(int a, int b) {
  int l, r;
  l = a * a * (m - 1) + b * b;
  r = sqrt(l);
  if (l == r * r) return true;
  return false;
}
bool check(int a, int b, int c, int d) {
  int l1, l2, r1, r2, l, r, r3, l3;
  l = a * a * (m - 1) + b * b;
  r = sqrt(l);
  if (r * r != l) return false;
  l1 = a * a * (n - 1) + c * c;
  r1 = sqrt(l1);
  if (r1 * r1 != l1) return false;
  l2 = b * b * (n - 1) + d * d;
  r2 = sqrt(l2);
  if (r2 * r2 != l2) return false;
  l3 = c * c * (m - 1) + d * d;
  r3 = sqrt(l3);
  if (l3 != r3 * r3) return false;
  return true;
}
int main() {
  bool flag, f;
  ios::sync_with_stdio(false);
  while (cin >> n >> m) {
    int a, c, b, d;
    a = b = c = d = -1;
    flag = 0;
    if (m == 1) {
      for (int i = 1; i <= 100; i++) {
        for (int j = 1; j <= 100; j++) {
          if (chen(i, j)) {
            a = i;
            b = j;
            flag = 1;
            break;
          }
        }
        if (flag) break;
      }
      for (int i = 0; i < n - 1; i++) cout << a << endl;
      cout << b << endl;
    } else if (n == 1) {
      for (int i = 1; i <= 100; i++) {
        for (int j = 1; j <= 100; j++) {
          if (chem(i, j)) {
            a = i;
            b = j;
            flag = 1;
            break;
          }
        }
        if (flag) break;
      }
      for (int i = 0; i < m - 1; i++) cout << a << " ";
      cout << b << endl;
    } else {
      for (int i = 1; i <= 100; i++) {
        for (int j = 1; j <= 100; j++) {
          for (int k = 1; k <= 100; k++) {
            for (int z = 1; z <= 100; z++) {
              if (check(i, j, k, z)) {
                flag = 1;
                a = i;
                b = j;
                c = k;
                d = z;
                break;
              }
            }
            if (flag) break;
          }
          if (flag) break;
        }
        if (flag) break;
      }
      for (int i = 0; i < n - 1; i++) {
        for (int j = 0; j < m - 1; j++) cout << a << " ";
        cout << b << endl;
      }
      for (int i = 0; i < m - 1; i++) cout << c << " ";
      cout << d << endl;
    }
  }
}
