#include <bits/stdc++.h>
#pragma GCC optimize("O3")
#pragma GCC target("avx2")
#pragma comment(linker, "/stack:200000000")
#pragma GCC optimize("Ofast")
#pragma GCC target("sse,sse2,sse3,ssse3,sse4,popcnt,abm,mmx,avx,tune=native")
using namespace std;
void solve() {
  int n;
  cin >> n;
  vector<int> ans;
  for (int i = 1; i <= 1000; i += 2) {
    ans.push_back(i);
    ans.push_back(i);
  }
  if (ans.size() < n) {
    for (int i = 0; i < ans.size(); i++) {
      cout << ans[i] << " ";
    }
    n -= ans.size();
    for (int i = 0; i < n; i++) {
      cout << ans[i] << " ";
    }
    cout << endl;
    return;
  }
  for (int i = int(0); i < int(n); i++) {
    cout << ans[i] << " ";
  }
  cout << endl;
}
signed main() {
  int t;
  cin >> t;
  while (t--) {
    solve();
  }
}
