#include <bits/stdc++.h>
using namespace std;
long long gcdExtended(long long a, long long b) {
  if (b == 0) {
    return a;
  } else
    return gcdExtended(b, a % b);
}
bool isprime(long long n) {
  long long count = 0;
  for (long long i = 2; i * i <= n; i++) {
    if (n % i == 0) {
      count++;
      break;
    }
  }
  if (count)
    return false;
  else
    return true;
}
long long fact(long long n) {
  long long fact = n;
  for (long long i = 2; i < n; i++) fact = (fact * i) % 1000000007;
  return fact;
}
float pi = 3.1415926535;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  int test_case = 1;
  cin >> test_case;
  while (test_case--) {
    long long n;
    cin >> n;
    for (long long i = 0; i < n; i++) cout << "1 ";
    cout << endl;
  }
  return 0;
}
