#include <bits/stdc++.h>
#define file(x) freopen(#x".in", "r", stdin), freopen(#x".out", "w", stdout)

inline int read()
{
	int data = 0, w = 1; char ch = getchar();
	while (ch != '-' && !std::isdigit(ch)) ch = getchar();
	if (ch == '-') w = -1, ch = getchar();
	while (std::isdigit(ch)) data = data * 10 + (ch ^ 48), ch = getchar();
	return data * w;
}

const int N(505);
int T, n, p[N];
std::vector<int> ans;

int main()
{
#ifndef ONLINE_JUDGE
	file(cpp);
#endif
	for (T = read(); T--; puts(""))
	{
		n = read(), ans.clear();
		for (int i = 1; i <= n; i++) p[i] = read();
		for (int t = 1; !std::is_sorted(p + 1, p + n + 1); t ^= 1)
		{
			int j = t ? 1 : 2;
			for (int i = j; i < n; i += 2) if (p[i] > p[i + 1]) j = i;
			std::swap(p[j], p[j + 1]), ans.push_back(j);
		}
		printf("%lu\n", ans.size());
		for (auto i : ans) printf("%d ", i);
	}
	return 0;
}

#include <bits/stdc++.h> 
using namespace std;
using ll =long long;
#define all(v) v.begin(),v.end()
 #define rep(i,a,b) for(int i=a;i<b;i++)
#define rrep(i,a,b) for(int i=a;i>=b;i--)


int main() {
ll N,K;cin>>N>>K;
for(ll i=0;i<K;i++) {
  if(N%200==0) N/=200;
  else {
    N=N*1000+200;
  }
}

cout<<N<<endl;
}
