#include <bits/stdc++.h>
using namespace std;
int main() {
  long long int t, n, i, x, sum, f;
  string s;
  ;
  cin >> t;
  while (t--) {
    cin >> n;
    cin >> s;
    f = 0;
    sum = 0;
    x = -1;
    for (i = n - 1; i >= 0; i--) {
      if ((s[i] - 48) % 2 == 1) {
        x = i;
        break;
      }
    }
    for (i = x; i >= 0; i--) {
      sum = sum + (long long int)(s[i] - 48);
      if (sum % 2 == 0) {
        f = 1;
        break;
      }
    }
    if (f) {
      for (; i <= x; i++) cout << s[i];
      cout << "\n";
    } else
      cout << -1 << "\n";
  }
}
