#include <bits/stdc++.h>
using namespace std;
const long double pi = acos(-1);
const long double PI = acos(-1.);
const int N = 1e5 + 5;
int main() {
  ios_base::sync_with_stdio(false);
  int T;
  cin >> T;
  while (T--) {
    int n;
    cin >> n;
    string s;
    cin >> s;
    int cnt = 0;
    for (auto x : s) {
      if ((x - '0') % 2 == 1) cnt++;
    }
    if (cnt < 2) {
      cout << "-1\n";
      continue;
    }
    while ((s.back() - '0') % 2 != 1) s.pop_back();
    if (cnt % 2 == 1) {
      int sz = s.size();
      for (int i = sz - 2; i >= 0; i--) {
        if ((s[i] - '0') % 2 == 1) {
          s.erase(s.begin() + i);
          break;
        }
      }
    }
    cout << s << "\n";
  }
  return 0;
}
