#include <bits/stdc++.h>
using namespace std;
int main() {
  std::ios::sync_with_stdio(false);
  long long int t;
  cin >> t;
  while (t--) {
    long long int n;
    cin >> n;
    string s;
    cin >> s;
    long long int odd = 0;
    long long int count = 0;
    for (int i = 0; i < n; i++) {
      if ((s[i] - '0') % 2 == 1) {
        odd++;
      }
    }
    if (odd <= 1) {
      cout << -1 << "\n";
    } else {
      for (int i = 0; i < n; i++) {
        if ((s[i] - '0') % 2 == 1) {
          cout << s[i];
          count++;
        }
        if (count == 2) {
          break;
        }
      }
      cout << endl;
    }
  }
  return 0;
}
