#include <bits/stdc++.h>
using namespace std;
int main() {
  int t;
  cin >> t;
  for (; t--;) {
    int n;
    cin >> n;
    int num1 = 0;
    int p = 0;
    for (int i = 1; i <= n; i++) {
      char ch;
      cin >> ch;
      if (!p && (ch - '0') % 2 == 1) {
        if (!num1)
          num1 = ch - '0';
        else {
          cout << num1 << ch << endl;
          p = 1;
        }
      }
    }
    if (!p) cout << "-1" << endl;
  }
}
