#include <bits/stdc++.h>
using namespace std;
int main() {
  int t;
  cin >> t;
  while (t--) {
    int a, b, c = 0, e, i, n;
    cin >> n;
    vector<char> v;
    char s[n + 1];
    cin >> s;
    for (i = 0; i < n; i++) {
      if ((s[i] - '0') % 2 != 0) {
        c++;
        v.push_back(s[i]);
        if (c == 2) break;
      }
    }
    if (c < 2)
      cout << "-1\n";
    else {
      for (i = 0; i < 2; i++) cout << v[i];
      cout << "\n";
    }
  }
}
