#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef pair<ll, ll> P;
#define rep(i, n) for (ll i = 0; i < (ll)(n); ++i)
#define rep2(i, s, n) for (ll i = (s); i < (ll)(n); i++)
const ll MAX = 1001001;
const ll MOD = 1000000007;
int main()
{
    ll t;
    cin >> t;
    rep(i, t)
    {
        ll n;
        cin >> n;
        vector<ll> a(n);
        map<ll, ll> m;
        rep(i, n)
        {
            cin >> a[i];
            m[a[i]]++;
        }
        if (n % 2 == 0)
        {
            bool b = true;
            for (auto p : m)
            {
                auto v = p.second;
                if (v % 2 != 0)
                {
                    b = false;
                }
            }
            if (b)
            {
                cout << "Second" << endl;
            }
            else
            {
                cout << "First" << endl;
            }
        }
        else
        {
            cout << "Second" << endl;
        }
    }
}
// Template
#include "bits/stdc++.h"
#define rep_override(x, y, z, name, ...) name
#define rep2(i, n) for (int i = 0; i < (int)(n); ++i)
#define rep3(i, l, r) for (int i = (int)(l); i < (int)(r); ++i)
#define rep(...) rep_override(__VA_ARGS__, rep3, rep2)(__VA_ARGS__)
#define all(x) (x).begin(), (x).end()
using namespace std;
using ll = long long;
constexpr int inf = 1001001001;
constexpr ll infll = 3003003003003003003LL;
template <typename T>
inline bool chmin(T &x, const T &y) {
    if (x > y) {
        x = y;
        return true;
    }
    return false;
}
template <typename T> 
inline bool chmax(T &x, const T &y) {
    if (x < y) {
        x = y;
        return true;
    }
    return false;
}
template <typename T>
istream &operator>>(istream &is, vector<T> &vec) {
    for (T &element : vec) is >> element;
    return is;
}
template <typename T>
ostream &operator<<(ostream &os, const vector<T> &vec) {
    for (int i = 0, vec_len = (int)vec.size(); i < vec_len; ++i) {
        os << vec[i] << (i + 1 == vec_len ? "" : " ");
    }
    return os;
}
struct IOSET {
    IOSET() {
        cin.tie(nullptr);
        ios::sync_with_stdio(false);
        cout << fixed << setprecision(10);
    }
} ioset;

// Main
int main() {
    int n;
    cin >> n;
    vector<int> a(n), b(n), p(n);
    cin >> a >> b >> p;
    rep(i, n) {
        --p[i];
    }
    
    rep(i, n) {
        if (a[i] <= b[p[i]] && p[i] != i) {
            cout << "-1\n";
            return 0;
        }
    }
    
    vector<int> idx(n);
    iota(all(idx), 0);
    sort(all(idx), [&](int i, int j) {return a[i] > a[j];});
    
    vector<int> ansi, ansj;
    for (int i : idx) {
        while (p[i] != i) {
            ansi.push_back(i + 1);
            ansj.push_back(p[i] + 1);
            swap(p[i], p[p[i]]);
        }
    }
    
    cout << ansi.size() << "\n";
    rep(i, ansi.size()) cout << ansi[i] << " " << ansj[i] << "\n";
}
