#include <bits/stdc++.h>
using namespace std;
int main() {
  int t, n, ans;
  cin >> t;
  while (t--) {
    ans = 1;
    cin >> n;
    if (n <= 50) {
      for (int i = 1; i <= n; i++) {
        cout << ans << " ";
        ans += 2;
      }
    } else {
      for (int i = 0; i < n; i++) {
        cout << 4 << " ";
      }
    }
    cout << endl;
  }
  return 0;
}
