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