#include <bits/stdc++.h>
using namespace std;
char s[300005];
int cnt;
int pos[300005];
int main() {
  int cas;
  scanf("%d", &cas);
  while (cas--) {
    int n;
    scanf("%d", &n);
    scanf("%s", s + 1);
    cnt = 0;
    for (int i = 1; i <= n; ++i) {
      if ((s[i] - '0') & 1) pos[++cnt] = i;
    }
    if (cnt & 1) {
      if (cnt == 1)
        puts("-1");
      else {
        for (int i = 1; i <= pos[cnt - 1]; ++i) printf("%c", s[i]);
        printf("\n");
      }
    } else {
      if (cnt == 0)
        puts("-1");
      else {
        for (int i = 1; i <= pos[cnt]; ++i) printf("%c", s[i]);
        printf("\n");
      }
    }
  }
  return 0;
}
