#include <bits/stdc++.h>
using namespace std;
void printStr(string& s, int lo, int hi) {
  for (int i = lo; i <= hi; i++) {
    if (s[i] != 'A' && s[i] != '0') cout << s[i];
  }
  cout << "\n";
}
void solve(string& s, int n) {
  int lo = 0;
  int hi = n - 1;
  int sum = 0;
  for (auto& x : s) {
    sum += (x - '0');
  }
  cerr << sum << endl;
  while (hi >= lo) {
    int x = s[hi] - '0';
    if (x & 1) break;
    s[hi--] = 'A';
    sum -= x;
  }
  if (hi < lo) {
    cout << "-1\n";
    return;
  }
  if (sum % 2 == 0) {
    printStr(s, lo, hi);
  } else {
    for (int i = lo; i < hi; i++) {
      int x = s[i] - '0';
      if (x & 1) {
        s[i] = 'A';
        printStr(s, lo, hi);
        return;
      }
    }
    cout << "-1\n";
  }
}
int main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  int t, n;
  string s;
  cin >> t;
  while (t--) {
    cin >> n;
    cin >> s;
    solve(s, n);
  }
  return 0;
}
