#include <bits/stdc++.h>
using namespace std;
long long add(long long x, long long y) {
  x += y;
  while (x >= 998244353) x -= 998244353;
  while (x < 0) x += 998244353;
  return x;
}
long long mul(long long x, long long y) { return (x * 1ll * y) % 998244353; }
long long binpow(long long x, long long y) {
  long long z = 1;
  while (y > 0) {
    if (y % 2 == 1) z = mul(z, x);
    x = mul(x, x);
    y /= 2;
  }
  return z;
}
long long inv(long long x) { return binpow(x, 998244353 - 2); }
long long divide(long long x, long long y) { return mul(x, inv(y)); }
signed main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  long long test;
  cin >> test;
  while (test--) {
    long long n;
    cin >> n;
    vector<long long> a(n, 1);
    for (long long i = 0; i < (long long)n; ++i) cout << a[i] << ' ';
    cout << endl;
  }
  return 0;
}
