#include <bits/stdc++.h>
using namespace std;
int main() {
  int t, n, ind;
  char c, ch[2];
  cin >> t;
  while (t--) {
    cin >> n;
    ind = 0;
    getchar();
    while (n--) {
      c = getchar();
      if (c % 2 and ind < 2) {
        ch[ind++] = c;
      }
    }
    if (ind == 2)
      cout << ch[0] << ch[1] << '\n';
    else
      cout << -1 << '\n';
  }
  return 0;
}
