#include <bits/stdc++.h>
using namespace std;
const int maxn = 1e5 + 10;
char s[maxn];
void solve() {
  int n;
  cin >> n;
  scanf("%s", s + 1);
  int cnt = 0;
  for (int i = 1; i <= n; i++) {
    if ((s[i] - '0') % 2 == 1) cnt++;
  }
  if (cnt < 2) {
    cout << -1 << endl;
    return;
  } else {
    int f1 = -1, f2 = -1;
    for (int i = 1; i <= n; i++) {
      if ((s[i] - '0') % 2 == 1) {
        if (f1 == -1)
          f1 = s[i] - '0';
        else
          f2 = s[i] - '0';
      }
      if (f2 != -1) break;
    }
    cout << f1 << f2 << endl;
  }
}
int main() {
  int T;
  cin >> T;
  while (T--) {
    solve();
  }
  return 0;
}
