#include <iostream>
#include <string>
#include <vector>
#include <algorithm>
#include <map>
#include <set>
#include <functional>

using namespace std;

bool draws(vector<pair<int, int> > r, vector<pair<int, int> > b) {
	long long rc = 0;
	long long bc = 0;
	while (!r.empty()) {
		if (b.empty()) return true;
		if (r.back().second > b.back().second) {
			bc += b.back().second * 1ll * b.back().first;
			rc += b.back().second * 1ll * r.back().first;
			r.back().second -= b.back().second;
			b.pop_back();
		} else {
			rc += r.back().second * 1ll * r.back().first;
			bc += r.back().second * 1ll * b.back().first;
			b.back().second -= r.back().second;
			r.pop_back();
		}
		if (rc > bc) return true;
	}
	while (!b.empty() && b.back().second == 0) b.pop_back();
	return b.empty();
}

void solve(int test_ind){
	int n;
	cin >> n;

	vector<pair<int, int > > r, b;
	for (int i=0;i<n;++i) {
		int x, m;
		char c;
		cin >> x >> m;
		cin >> c;
		if (c == 'R') {
			r.push_back({x, m});
		} else {
			b.push_back({x, m});
		}
	}
	int mn = -1;
	if (draws(r, b)) mn = 0;
	auto r1 = r;
	r1.back().second--;
	r1.push_back({r.back().first + 1, 1});
	if (mn == 0 && draws(b, r1)) {
		cout << "DRAW " << r.back().first << " +" << endl;
		return;
	}
	if (mn == -1) cout << "SECOND" << endl;
	else cout << "FIRST " << r.back().first << " +" << endl;
}

int main(){
	cin.tie(0);
	ios_base::sync_with_stdio(false);
	int t=1;
	cin >> t;
	for(int i=0;i<t;i++){
		solve(i);
	}
	return 0;
}
