#include <bits/stdc++.h>
using namespace std;
signed main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  long long int t;
  cin >> t;
  while (t--) {
    long long int n;
    cin >> n;
    string s;
    cin >> s;
    long long int akey = 0, v = 0;
    for (long long int i = s.length() - 1; i >= 0; i--) {
      if ((s[i] - '0') % 2 == 1) {
        akey++;
      }
    }
    long long int ans = 0;
    if (akey >= 2)
      for (long long int i = 0; i < s.length(); i++) {
        if ((s[i] - '0') % 2 == 1) {
          cout << s[i];
          ans++;
        }
        if (ans == 2) break;
      }
    else {
      cout << -1 << endl;
      continue;
    }
    cout << endl;
  }
  return 0;
}
