#include <bits/stdc++.h>
using namespace std;
int main() {
  int tc;
  cin >> tc;
  while (tc--) {
    long int n, temp, i, j = 0;
    string s;
    char a[2];
    cin >> n;
    cin >> s;
    for (i = 0; i < n; i++) {
      if (int(s[i] - '0') % 2 == 1) {
        a[j] = s[i];
        j++;
      }
      if (j >= 2) break;
    }
    if (j == 2) {
      cout << a[0] << a[1] << endl;
    } else {
      cout << "-1" << endl;
    }
  }
  return 0;
}
