#include <bits/stdc++.h>
using namespace std;
int main(void) {
  int t;
  cin >> t;
  for (int z = 0; z < t; ++z) {
    int n;
    string s;
    cin >> n >> s;
    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";
    }
  }
  return 0;
}
