#include <bits/stdc++.h>
using namespace std;
int N;
vector<int> V;
bool Do() {
  while (V.size() > 0 && V.back() % 2 == 0) V.pop_back();
  if (V.size() == 0) return false;
  int sum = 0;
  int p = -1;
  for (int i = 0; i < V.size(); ++i) {
    if (V[i] % 2 && i < V.size() - 1) p = i;
    sum += V[i];
  }
  if (sum % 2 == 0)
    return true;
  else if (p == -1)
    return false;
  else {
    for (int i = p; i + 1 < V.size(); ++i) V[i] = V[i + 1];
    V.pop_back();
    return true;
  }
}
int main() {
  int nr_t, nr;
  char c;
  cin >> nr_t;
  for (int i = 1; i <= nr_t; ++i) {
    cin >> N;
    for (int j = 1; j <= N; ++j) {
      cin >> c;
      V.push_back(c - '0');
    }
    if (!Do())
      cout << "-1" << '\n';
    else {
      for (int i = 0; i < V.size(); ++i) cout << V[i];
      cout << '\n';
    }
    V.clear();
  }
  return 0;
}
