#include <bits/stdc++.h>
using namespace std;
int main() {
  long long t;
  cin >> t;
  while (t--) {
    long long n;
    cin >> n;
    string v;
    cin >> v;
    long long imp1 = 0, imp2 = 0, i = 0;
    while (i < n) {
      if ((v[i] - '0') % 2 != 0) {
        imp1 = v[i] - '0';
        i++;
        break;
      }
      i++;
    }
    while (i < n) {
      if ((v[i] - '0') % 2 != 0) {
        imp2 = v[i] - '0';
        break;
      }
      i++;
    }
    if (imp1 && imp2) {
      cout << imp1 << imp2 << "\n";
    } else {
      cout << "-1\n";
    }
  }
  return 0;
}
