#include <bits/stdc++.h>
using namespace std;
inline long long read() {
  long long x = 0, f = 1;
  char c = getchar();
  while (c != '-' && (c < '0' || c > '9')) c = getchar();
  if (c == '-') f = -1, c = getchar();
  while (c >= '0' && c <= '9') x = x * 10 + c - '0', c = getchar();
  return f * x;
}
const long long N = 1e6 + 7;
const long long M = 2e7 + 7;
const long long MAXN = 2e18 + 7;
const long long Mod = 998244353;
long long _, i, j, k, n, m, p, q, s, T, t, l, r, o, u, v, w, x, y, z, ans, nex,
    sum, num, len, en, sx, sy, tx, ty, th, ma, mi, mod, op, res, flag, cas, bk,
    ret, mid, now, tmp, rt;
long long a[N], b[N], c[N], d[N];
char ch[M];
vector<long long> g[N], h;
string s1, s2, s3;
signed main() {
  long long T = 1;
  scanf("%lld", &T);
  while (T--) {
    scanf("%lld", &n);
    for (i = 1; i <= n; i++) printf("1 ");
    printf("\n");
  }
  return 0;
}
