#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  cin >> n;
  while (n--) {
    int c;
    cin >> c;
    cout << c << " ";
    for (int i = 0; i < c; i++) cout << i + 1 << " ";
  }
}
