#include <bits/stdc++.h>
using namespace std;
int n, t, s, k;
char c, b[2];
int main() {
  ios_base::sync_with_stdio(false);
  cin >> t;
  for (int j = 0; j < t; ++j) {
    cin >> n;
    k = 0;
    for (int i = 0; i < n; ++i) {
      cin >> c;
      if (c % 2 && k < 2) {
        b[k] = c;
        ++k;
      }
    }
    if (k == 2)
      cout << b[0] << b[1] << endl;
    else
      cout << "-1" << endl;
  }
  return 0;
}
