#include <bits/stdc++.h>
using namespace std;
int main() {
  int test;
  cin >> test;
  for (int i = 0; i < test; i++) {
    int n;
    cin >> n;
    string s;
    cin >> s;
    if (n == 1) {
      cout << -1 << endl;
    } else {
      int count = 0;
      vector<int> A;
      for (int i = 0; i < n; i++) {
        if ((s[i] - '0') % 2 != 0) {
          A.push_back(s[i] - '0');
          count++;
        }
        if (count == 2) {
          break;
        }
      }
      if (A.size() < 2) {
        cout << -1 << endl;
      } else {
        cout << A[0] << A[1] << endl;
      }
    }
  }
}
