#include <bits/stdc++.h>
using namespace std;
void solve() {
  int n;
  cin >> n;
  string s;
  cin >> s;
  vector<char> ans;
  for (int i = 0; i < n; i++) {
    if ((s[i] - '0') % 2 == 1) {
      ans.push_back(s[i]);
      if (ans.size() == 2) break;
    }
  }
  if (ans.size() == 2) {
    for (char c : ans) cout << c;
    cout << endl;
  } else {
    cout << "-1\n";
  }
}
int main() {
  int t;
  cin >> t;
  while (t--) solve();
  return 0;
}
