#include <bits/stdc++.h>
using namespace std;
int main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  int n;
  cin >> n;
  for (int i = 0; i < n; i++) {
    int l;
    string s;
    cin >> l >> s;
    while (!s.empty() && (s.back() - '0') % 2 == 0) s.pop_back();
    if (s.empty())
      cout << "-1\n";
    else {
      int sum = 0, pos = -1;
      bool found = false;
      for (int j = s.length() - 1; j >= 0; j--) {
        sum += (s[j] - '0');
        if (!found && (s[j] - '0') % 2 == 1) {
          found = true;
          pos = j;
        }
      }
      sum %= 2;
      if (sum == 0)
        cout << s << '\n';
      else if (!found)
        cout << "-1\n";
      else {
        s.erase(s.begin() + pos);
        while (!s.empty() && (s.back() - '0') % 2 == 0) s.pop_back();
        if (s.empty())
          cout << "-1\n";
        else
          cout << s << '\n';
      }
    }
  }
}
