#include <bits/stdc++.h>
using namespace std;
const int N = 1010;
struct node {
  string name;
  string id;
  bool sick;
  int th, tm;
  int s;
} a[N];
bool cmp(node a, node b) {
  int t1 = a.th * 60 + a.tm, t2 = b.th * 60 + b.tm;
  if (t1 == t2) {
    return a.s < b.s;
  }
  return a.th * 60 + a.tm < b.th * 60 + b.tm;
}
bool check(string str) {
  if (str.size() != 18) return false;
  for (int i = 0; i < str.size(); ++i) {
    if (!isdigit(str[i])) return false;
  }
  return true;
}
int d, p, n, m, date, s;
map<string, int> mp;
vector<node> sick;
int main() {
  int n;
  cin >> n;
  while (n--) {
    int m;
    cin >> m;
    for (int i = 0; i < m; ++i) {
      cout << "1 ";
    }
    puts("");
  }
}
