#include <bits/stdc++.h>
using namespace std;
using ll = long long;
const ll mxx = 30005;
int main() {
  ll t;
  cin >> t;
  while (t--) {
    string s;
    ll n;
    cin >> n >> s;
    while (s.size() > 0) {
      ll x = s[s.size() - 1] - '0';
      if (x % 2 == 0) {
        s.erase(s.size() - 1, 1);
      } else
        break;
    }
    if (s.size() > 0) {
      ll sum = 0;
      for (int i = 0; i < s.size(); i++) {
        ll x = s[i] - '0';
        sum += x;
      }
      if (sum % 2 == 0)
        cout << s << endl;
      else {
        ll k = 0;
        for (int i = 1; i < s.size() - 1; i++) {
          ll x = s[i] - '0';
          if (x % 2 != 0) {
            s.erase(i, 1);
            k = 1;
            break;
          }
        }
        if (k == 1)
          cout << s << endl;
        else
          cout << "-1\n";
      }
    } else
      cout << -1 << endl;
  }
  return 0;
}
