#include <bits/stdc++.h>
#pragma GCC optimize("Ofast")
using namespace std;
char buff[1000005];
int main() {
  int T;
  cin >> T;
  while (T--) {
    int odd = 0, n;
    cin >> n;
    scanf("%s", buff + 1);
    for (int i = 1; i <= n; i++)
      if ((buff[i] - '0') % 2) odd++;
    if (odd == 0 || odd == 1) {
      puts("-1");
      continue;
    }
    int cnt = 0;
    for (int i = 1; i <= n; i++) {
      if ((buff[i] - '0') % 2) putchar(buff[i]), cnt++;
      if (cnt == 2) break;
    }
    putchar('\n');
  }
  return 0;
}
