#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  long long t = 1;
  cin >> t;
  while (t--) {
    long long n, o = 0, e = 0;
    cin >> n;
    string s;
    cin >> s;
    vector<long long> v;
    for (long long i = 0; i < n; ++i) {
      if ((s[i] - '0') % 2) {
        o++;
        v.push_back(i);
      } else {
        e++;
      }
    }
    if (o <= 1) {
      cout << -1;
    } else {
      for (long long i = v[0]; i < v[1] + 1; ++i) {
        cout << s[i];
      }
    }
    cout << '\n';
  }
  return 0;
}
