#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  cin >> n;
  while (n--) {
    int t;
    cin >> t;
    string s = "", p;
    cin >> p;
    vector<int> v;
    int c = 0, count_invalid = 0;
    for (int i = 0; i < p.size(); i++) {
      if (char((int)p[i]) % 2 == 1 && c < 2) {
        s += p[i];
        c++;
      }
      if (char((int)p[i]) % 2 == 1) count_invalid++;
    }
    if (count_invalid <= 1)
      cout << "-1" << endl;
    else
      cout << s << endl;
  }
}
