#include <bits/stdc++.h>
using namespace std;
struct Dbg {
  template <typename T>
  Dbg& operator,(const T& v) {
    cerr << v << ", ";
    return *this;
  }
} Dbg;
template <typename T>
ostream& operator<<(ostream& _o_, const vector<T>& _v_) {
  if (!_v_.empty()) {
    _o_ << '[';
    copy(_v_.begin(), _v_.end(), ostream_iterator<T>(_o_, ", "));
    _o_ << "\b\b]";
  }
  return _o_;
}
mt19937 rng(chrono::steady_clock::now().time_since_epoch().count());
void solve() {
  int n;
  string s;
  cin >> n >> s;
  int sum = 0;
  string ans;
  for (int i = 0; i < n; i++) {
    if ((s[i] - '0') % 2 == 1) {
      ans += s[i];
    }
    if (ans.size() == 2) break;
  }
  if (ans.size() < 2) {
    cout << -1 << '\n';
  } else {
    cout << ans << '\n';
  }
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  int t;
  cin >> t;
  while (t--) {
    solve();
  }
  return 0;
}
