#include <bits/stdc++.h>
using namespace std;
template <typename R>
R read(R &x) {
  x = 0;
  char c = getchar();
  R f = 1;
  for (; !isdigit(c); c = getchar())
    if (c == '-') f = -1;
  for (; isdigit(c); c = getchar()) x = (x << 1) + (x << 3) + (c ^ 48);
  return x = x * f;
}
template <typename W>
void write(W x) {
  if (x < 0) x = (~x) | 1, putchar('-');
  if (x > 9) write(x / 10);
  putchar((x - (x / 10) * 10) + 48);
}
int T, n;
int main() {
  cin >> T;
  for (; T--;) {
    cin >> n;
    for (int i = 1; i <= n; i++) putchar('1'), putchar(' ');
    puts("");
  }
}
