
#include<bits/stdc++.h>
//#include<ext/pb_ds/assoc_container.hpp>
//#include<ext/pb_ds/tree_policy.hpp>
//#include <ext/pb_ds/trie_policy.hpp>
//using namespace __gnu_pbds;
using namespace std;
#define ll 				long long int
#define ld				long double
#define mod             1000000007
#define inf             1e18
#define endl			"\n"
#define pb 				push_back
#define vi              vector<int>
#define vl              vector<ll>
#define vs				vector<string>
#define pii             pair<ll,ll>
#define ump				unordered_map
#define mp 				make_pair
#define pq_max          priority_queue<ll>
#define pq_min          priority_queue<ll,vi,greater<ll> >
#define all(n) 			n.begin(),n.end()
#define ff 				first
#define ss 				second
#define mid(l,r)        (l+(r-l)/2)
#define bitc(n) 		__builtin_popcount(n)
#define loop(i,a,b) 	for(int i=(a);i<=(b);i++)
#define looprev(i,a,b) 	for(int i=(a);i>=(b);i--)
#define iter(container, it) for(__typeof(container.begin()) it = container.begin(); it != container.end(); it++)
#define log(args...) 	{ string _s = #args; replace(_s.begin(), _s.end(), ',', ' '); stringstream _ss(_s); istream_iterator<string> _it(_ss); err(_it, args); }
#define logarr(arr,a,b)	for(int z=(a);z<=(b);z++) cout<<(arr[z])<<" ";cout<<endl;
#define M 		1000000007
#define w(x)            int x; cin>>x; while(x--)
template <typename T> T gcd(T a, T b) {if (a % b) return gcd(b, a % b); return b;}
template <typename T> T lcm(T a, T b) {return (a * (b / gcd(a, b)));}
vs tokenizer(string str, char ch) {std::istringstream var((str)); vs v; string t; while (getline((var), t, (ch))) {v.pb(t);} return v;}


void err(istream_iterator<string> it) {}
template<typename T, typename... Args>
void err(istream_iterator<string> it, T a, Args... args) {
	cout << *it << " = " << a << endl;
	err(++it, args...);
}
//typedef tree<ll, null_type, less<ll>, rb_tree_tag, tree_order_statistics_node_update> pbds;
//typedef trie<string,null_type,trie_string_access_traits<>,pat_trie_tag,trie_prefix_search_node_update> pbtrie;



void file_i_o()
{
	ios_base::sync_with_stdio(0);
	cin.tie(0);
	cout.tie(0);
#ifndef ONLINE_JUDGE
	freopen("input.txt", "r", stdin);
	freopen("output.txt", "w", stdout);
#endif
}



int main(int argc, char const *argv[]) {
	clock_t begin = clock();
	file_i_o();
	// Write your code here....

	double sx, sy, gx, gy;
	cin >> sx >> sy >> gx >> gy;

	double ans = double(((sy * (gx - sx)) / (gy + sy)) + sx);

	cout << fixed << setprecision(10) << ans << endl;


#ifndef ONLINE_JUDGE
	clock_t end = clock();
	cout << "\n\nExecuted In: " << double(end - begin) / CLOCKS_PER_SEC * 1000 << " ms";
#endif
	return 0;
}








#include <bits/stdc++.h>
using namespace std;
#define ll long long
#define rep(i, n) for(i = 0; i < n; i++)
bool dfs(vector<int> &p, int swapFlag, int dep, vector<int> &ans) {
	int n = min(4, (int)p.size());
	int i;
	
	rep(i, n) if (p[i] != i) break;
	if (i == n) return true;
	if (dep >= n * n) return false;
	
	rep(i, n - 1) {
		if (i % 2 != swapFlag % 2) { continue; }
		swap(p[i], p[i + 1]);
		ans.push_back(i);
		bool res = dfs(p, !swapFlag, dep + 1, ans);
		if (res) return true;
		swap(p[i], p[i + 1]);
		ans.pop_back();
	}
	return false;
}

vector<int> solve(vector<int> p) {
	int n = p.size();
	int i, j;
	int cnt = 0;
	vector<int> ret;
	
	for (i = n; i >= 5; i--) {
		rep(j, i) if (p[j] == i - 1) break;
		int pos = j;
		if (pos == i - 1) continue;
		if (pos % 2 != cnt % 2) {
			rep(j, i - 1) {
				if (j != pos && j + 1 != pos && j % 2 == cnt % 2) {
					break;
				}
			}
			swap(p[j], p[j + 1]);
			cnt++;
			ret.push_back(j);
		}
		for (j = pos; j + 1 < i; j++) {
			swap(p[j], p[j + 1]);
			cnt++;
			ret.push_back(j);
		}
	}
	dfs(p, cnt % 2, 0, ret);
	return ret;
}

int main() {
	int T, i;
	
	cin >> T;
	while (T--) {
		int n;
		cin >> n;
		vector<int> p(n);
		rep(i, n) { cin >> p[i]; p[i]--; }
		
		vector<int> ans = solve(p);
		
		cout << ans.size() << endl;
		rep(i, ans.size()) {
			cout << ans[i] + 1;
			if (i + 1 < ans.size()) cout << " ";
		}
		cout << endl;
	}
	return 0;
}
