#include <bits/stdc++.h>
using namespace std;
const double eps = 1e-9;
const long long INF = numeric_limits<long long>::max() / 3;
template <class T>
void mini(T &a, T b) {
  a = min(a, b);
}
template <class T>
void maxi(T &a, T b) {
  a = max(a, b);
}
long long mrand() { return rand() * ((long long)RAND_MAX + 1LL) + rand(); }
vector<long long> readVec(long long n) {
  vector<long long> result(n);
  for (long long i = 0; i < n; i++) {
    cin >> result[static_cast<std::size_t>(i)];
  }
  return result;
}
void solve() {
  long long n;
  cin >> n;
  string input;
  cin >> input;
  while (input.size() > 0 && (input.back() - '0') % 2 == 0) {
    input.pop_back();
  }
  if (input.size() == 0) {
    cout << -1 << endl;
    return;
  }
  long long sum = 0;
  for (char c : input) {
    sum += c - '0';
  }
  if (sum % 2 == 1) {
    for (long long i = (long long)input.size() - 2; i >= 0; i--) {
      if ((input[i] - '0') % 2 == 1) {
        input.erase(input.begin() + i);
        cout << input << endl;
        return;
      }
    }
    cout << -1 << endl;
    return;
  }
  cout << input << endl;
  return;
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(nullptr);
  srand(chrono::steady_clock::now().time_since_epoch().count());
  int t = 1;
  cin >> t;
  for (int i = 0; i < t; i++) {
    solve();
  }
  return 0;
}
