#include <bits/stdc++.h>
using namespace std;
signed main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  long long T;
  cin >> T;
  while (T--) {
    long long n, i, j;
    cin >> n;
    string s;
    cin >> s;
    long long a[n], odd = 0;
    for (i = 0; i < n; i++) {
      a[i] = s[i] - '0';
      odd += (a[i] % 2);
    }
    if (odd == 0 || odd == 1)
      cout << -1 << endl;
    else {
      long long l = 0, r = n - 1;
      while (a[l] % 2 == 0) l++;
      while (a[r] % 2 == 0) r--;
      if (odd % 2 == 1) {
        l++;
        while (s[l] % 2 == 0) l++;
      }
      for (i = l; i <= r; i++) cout << s[i];
      cout << endl;
    }
  }
  return 0;
}
