#include <bits/stdc++.h>
using namespace std;
const int maxn = 1e5 + 10;
const int INF = 0x3f3f3f3f;
const int mod = 998244353;
int main() {
  int l;
  scanf("%d", &l);
  while (l--) {
    int n;
    char ch[maxn];
    scanf("%d", &n);
    getchar();
    scanf("%s", ch);
    int num = 0;
    int x1, x2;
    for (int i = 0; i < n; i++) {
      int s = ch[i] - '0';
      if (s % 2 == 1 && num == 0) {
        x1 = s;
        num++;
      } else if (s % 2 == 1 && num == 1) {
        x2 = s;
        num++;
        break;
      }
    }
    if (num == 2)
      cout << x1 << x2 << endl;
    else
      cout << -1 << endl;
  }
  return 0;
}
