#include <bits/stdc++.h>
using namespace std;
long long cl(long long n, long long m) {
  if (n % m)
    return n / m + 1;
  else
    return n / m;
}
long long pw(long long a, long long b, long long M) {
  a %= M;
  long long r = 1;
  while (b > 0) {
    if (b & 1) r = r * a % M;
    a = a * a % M;
    b >>= 1;
  }
  return r;
}
const long long N = 1e6 + 5;
signed main() {
  long long TT;
  cin >> TT;
  while (TT--) {
    long long n;
    cin >> n;
    for (long long i = 1; i <= n; i++) cout << "1 ";
    cout << endl;
  }
}
