#include <bits/stdc++.h>
using namespace std;
template <typename arg>
void debugger(const char* varname, arg&& var) {
  cout << varname << " = " << var << endl;
}
template <typename arg, typename... args>
void debugger(const char* varnames, arg&& var, args&&... vars) {
  const char* comma = strchr(varnames + 1, ',');
  cout.write(varnames, comma - varnames) << " = " << var << " | ";
  int sz = 1;
  if (isspace(comma[sz])) sz++;
  debugger(comma + sz, vars...);
}
using ll = long long;
using ii = pair<int, int>;
using iii = pair<int, ii>;
using vi = vector<int>;
using vii = vector<ii>;
using vvi = vector<vi>;
using vs = vector<string>;
extern const int INF = INT_MAX - 5;
extern const ll LINF = LLONG_MAX - 5;
extern const int MOD = 1e9 + 7;
extern const int N = 2e5 + 200;
int t, n;
string s;
int main() {
  cin >> t;
  while (t--) {
    cin >> n;
    cin >> s;
    int a = 0, b = 0;
    for (auto i : s) {
      int p = (i - '0');
      if (p & 1) {
        if (a == 0) {
          a = p;
        } else {
          b = p;
          break;
        }
      }
    }
    if (a == 0 or b == 0) {
      puts("-1");
    } else {
      cout << a << b << '\n';
    }
  }
  return 0;
}
