#include <bits/stdc++.h>
using namespace std;
const int maxn = 3000 + 10;
const int maxm = 30 + 10;
const long long mod = 998244353;
const int inf = 0x3ffffff;
const double eps = 1e-5;
int t;
bool vis[maxn];
int main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  cin >> t;
  while (t--) {
    int n;
    string s;
    cin >> n >> s;
    while (n >= 1 && (s[n - 1] - '0') % 2 == 0) n--;
    if (n == 0) {
      cout << "-1" << endl;
      continue;
    }
    int cnt = 0;
    int index = 0;
    for (int i = 0; i < n - 1; i++) {
      if ((s[i] - '0') & 1) {
        cnt++;
        index = i;
      }
    }
    if (cnt & 1) {
      for (int i = 0; i < n; i++) cout << s[i];
    } else {
      if (cnt == 0)
        cout << "-1";
      else {
        for (int i = 0; i < n; i++) {
          if (i != index) cout << s[i];
        }
      }
    }
    cout << endl;
  }
  return ~~(0 - 0);
}
