#include <bits/stdc++.h>
using namespace std;
int main() {
  int t;
  cin >> t;
  while (t > 0) {
    --t;
    int n;
    cin >> n;
    string s;
    cin >> s;
    int sum = 0;
    for (auto it : s) {
      sum += it - '0';
    }
    if (sum % 2 == 0 && (s[n - 1] - '0') % 2 != 0) {
      cout << s << endl;
    } else if (sum % 2 != 0 && (s[n - 1] - '0') % 2 != 0) {
      string res = "";
      bool f = true;
      for (int i = 0; i < n - 1; ++i) {
        if ((s[i] - '0') != 0 && ((s[i] - '0') % 2 == 0 || !f)) {
          res.push_back(s[i]);
        }
        if ((s[i] - '0') % 2 != 0 && f) {
          f = false;
        }
      }
      res.push_back(s[n - 1]);
      if (!f) {
        cout << res << endl;
      } else
        cout << "-1" << endl;
    } else if (sum % 2 == 0 && (s[n - 1] - '0') % 2 == 0) {
      string res = "";
      bool f = true;
      for (int i = n - 1; i >= 0; --i) {
        if ((s[i] - '0') % 2 != 0 && f) {
          f = false;
          res.push_back(s[i]);
        } else if (!f && (s[i] - '0') != 0) {
          res.push_back(s[i]);
        }
      }
      reverse(res.begin(), res.end());
      if (!f) {
        cout << res << endl;
      } else
        cout << "-1" << endl;
    } else if (sum % 2 != 0 && (s[n - 1] - '0') % 2 == 0) {
      string res = "";
      bool f = true;
      bool l = true;
      for (int i = n - 1; i >= 0; --i) {
        if ((s[i] - '0') % 2 != 0 && f) {
          f = false;
          res.push_back(s[i]);
        } else if (!f && (s[i] - '0') != 0) {
          res.push_back(s[i]);
        }
      }
      s = res;
      res = "";
      reverse(s.begin(), s.end());
      for (int i = 0; i < s.size() - 1; ++i) {
        if ((s[i] - '0') % 2 != 0 && l) {
          l = false;
        } else if (!l) {
          res.push_back(s[i]);
        }
      }
      res.push_back(s[s.size() - 1]);
      if (!l && !f) {
        cout << res << endl;
      } else
        cout << "-1" << endl;
    }
  }
  return 0;
}
