#include <bits/stdc++.h>
using namespace std;
int main() {
  int i, j, k, t, n, p;
  cin >> t;
  while (t--) {
    string str;
    p = 0;
    cin >> n >> str;
    for (i = 0; i < n; i++) {
      int x = str[i] - '0';
      if (x % 2 == 1 && p == 0)
        p = p * 10 + x;
      else if (x % 2 == 1 && p > 0) {
        p = p * 10 + x;
        printf("%d\n", p);
        break;
      }
    }
    if (p < 10) cout << -1 << endl;
  }
  return 0;
}
