#include <bits/stdc++.h>
using namespace std;
int main() {
  int t, n, odd = 0, x = 0, i, j;
  cin >> t;
  while (t--) {
    cin >> n;
    string a;
    cin >> a;
    for (i = 0; i < n; i++) {
      if (a[i] % 2 != 0) odd++;
    }
    for (j = (n - 1); j >= 0; j--) {
      if ((a[j] % 2) != 0 && (odd) % 2 == 0) {
        break;
      } else {
        x++;
        if (a[j] % 2 != 0) {
          odd--;
        }
      }
    }
    if (x == n) cout << "-1";
    int s = n - x;
    for (j = 0; j < s; j++) cout << a[j];
    cout << endl;
    odd = 0;
    x = 0;
  }
  return 0;
}
