#include <bits/stdc++.h>
using namespace std;
signed main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  ;
  long long int k;
  cin >> k;
  while (k--) {
    string s, t = "";
    long long int n;
    cin >> n >> s;
    for (long long int i = 0; i < s.size(); i++) {
      if (s[i] == '1' || s[i] == '3' || s[i] == '5' || s[i] == '7' ||
          s[i] == '9')
        t = t + s[i];
      if (t.size() >= 2) break;
    }
    if (t.size() < 2)
      cout << "-1\n";
    else
      cout << t << "\n";
  }
  return 0;
}
