#include <bits/stdc++.h>
using namespace std;
int main() {
  int t;
  cin >> t;
  while (t--) {
    int n;
    char a[3005];
    scanf("%d", &n);
    getchar();
    for (int i = 1; i <= n; i++) {
      scanf("%c", &a[i]);
    }
    int p1, p2;
    for (p1 = 1; p1 <= n; p1++) {
      if ((a[p1] - '0') % 2 == 1) break;
    }
    for (p2 = p1 + 1; p2 <= n; p2++) {
      if ((a[p2] - '0') % 2 == 1) break;
    }
    if (p1 <= n && p2 <= n) {
      printf("%c%c\n", a[p1], a[p2]);
    } else {
      printf("-1\n");
    }
  }
  return 0;
}
