#include <bits/stdc++.h>
using namespace std;
const int maxn = 3e3 + 5;
int n;
string s;
int main() {
  ios::sync_with_stdio(false);
  int t;
  cin >> t;
  while (t--) {
    cin >> n >> s;
    int sum = 0;
    for (int i = 0; i < n; ++i) {
      if ((s[i] - '0') % 2 != 0) {
        ++sum;
      }
    }
    if (sum <= 1) {
      cout << "-1" << endl;
    } else {
      int sta = 0, ent = n - 1;
      while (ent >= sta && (s[ent] - '0') % 2 == 0) {
        --ent;
      }
      if (sum % 2 == 0) {
        for (int i = sta; i <= ent; ++i) {
          cout << s[i];
        }
        cout << endl;
      } else {
        while (sta <= ent && (s[sta] - '0') % 2 == 0) {
          ++sta;
        }
        if (sta < ent) ++sta;
        while (sta <= ent && s[sta] == '0') ++sta;
        for (int i = sta; i <= ent; ++i) {
          cout << s[i];
        }
        cout << endl;
      }
    }
  }
  return 0;
}
