#include <bits/stdc++.h>
using namespace std;
bool seive[1000001];
int primeSeive[1000001];
long long int gcd(long long int a, long long int b) {
  if (b == 0) return a;
  return gcd(b, a % b);
}
long long int lcm(long long int a, long long int b) {
  long long int gcd_ = gcd(a, b);
  long long int lcm_ = (a * b) / gcd_;
  return lcm_;
}
long long int fastPower(long long int a, long long int b) {
  long long int res = 1;
  while (b > 0) {
    if (b & 1) res *= a;
    a *= a;
    b >>= 1;
  }
  return res;
}
long long int fastPowerM(long long int a, long long int b, long long int mod) {
  a %= mod;
  long long int res = 1;
  while (b) {
    if (b % 2 == 1) res = (res * a) % mod;
    a = (a * a) % mod;
    b >>= 1;
  }
  return res;
}
void multiply(long long int a[][2], long long int b[][2], int mod) {
  int res[2][2];
  memset(res, 0, sizeof(res));
  for (int i = 0; i < 2; i++) {
    for (int j = 0; j < 2; j++) {
      for (int k = 0; k < 2; k++) {
        res[i][j] += a[i][k] * b[k][j] % mod;
      }
    }
  }
  for (int i = 0; i < 2; i++)
    for (int j = 0; j < 2; j++) a[i][j] = res[i][j];
}
void matrixExpo(long long int a[][2], long long int n, int mod) {
  if (n == 0 || n == 1) return;
  long long int b[][2] = {{1, 1}, {1, 0}};
  matrixExpo(a, n / 2, mod);
  multiply(a, a, mod);
  if (n % 2) multiply(a, b, mod);
}
void makeSeive() {
  for (int i = 2; i * i <= 1000001; i++) {
    if (seive[i]) {
      for (int j = i * i; j <= 1000001; j += i) seive[j] = false;
    }
  }
}
void makePrimeSeive() {
  for (int i = 1; i < 1000001; i++) primeSeive[i] = i;
  for (int i = 4; i < 1000001; i += 2) primeSeive[i] = 2;
  for (int i = 3; i * i < 1000001; i++) {
    if (primeSeive[i] == i) {
      for (int j = i * i; j < 1000001; j += i) {
        if (primeSeive[j] == j) primeSeive[j] = i;
      }
    }
  }
}
bool isPrime(long long int n) {
  for (int i = 2; i <= sqrt(n); i++) {
    if (n % i == 0) return false;
  }
  return true;
}
void getInput(vector<long long int>& a, int n) {
  long long int x;
  for (int i = 0; i < n; i++) {
    cin >> x;
    a.push_back(x);
  }
}
void testCase() {
  long long int i, n;
  vector<long long int> node;
  cin >> n;
  for (i = 1; i <= n; i++) {
    cout << 1 << ' ';
  }
}
int main() {
  int t = 1;
  cin >> t;
  while (t--) {
    testCase();
    cout << '\n';
  }
  return 0;
}
