#include <bits/stdc++.h>
using namespace std;
const int INF = 0x3f3f3f3f;
const double EPS = 1e-10, PI = acos(-1.);
int T, n;
int main() {
  cin >> T;
  while (T--) {
    string s;
    vector<int> a;
    cin >> n >> s;
    for (auto i : s)
      if ((i - '0') & 1) a.push_back(i - '0');
    if (a.size() < 2)
      puts("-1");
    else
      printf("%d%d\n", a[0], a[1]);
  }
  return 0;
}
