#include <bits/stdc++.h>
using namespace std;
int main() {
  int t;
  scanf("%d", &t);
  while (t--) {
    int n;
    scanf("%d", &n);
    string str;
    cin >> str;
    bool fnd = false;
    for (int i = 0; i < n; i++) {
      if (fnd == true) break;
      if ((str[i] - '0') % 2 == 1) {
        for (int j = i + 1; j < n; j++) {
          if (fnd == true) break;
          if ((str[j] - '0') % 2 == 1) {
            printf("%d%d\n", str[i] - '0', str[j] - '0');
            fnd = true;
            break;
          }
        }
      }
    }
    if (fnd == false) printf("-1\n");
  }
}
