#include <bits/stdc++.h>
using namespace std;
int main() {
  int t;
  cin >> t;
  for (int i = 0; i < t; ++i) {
    int n;
    cin >> n;
    string s;
    cin >> s;
    int sum(0), pos(-1), pos1(-1), ot(-1), num(0);
    for (int i = 0; i < s.length(); ++i) sum += (s[i] - '0');
    for (int i = 0; i < s.length(); ++i) {
      if ((s[i] - '0') % 2) {
        pos = i;
        num = s[i] - '0';
      }
    }
    for (int i = 0; i < s.length(); ++i) {
      if ((s[i] - '0') % 2 == 0)
        pos1 = i;
      else if ((s[i] - '0') % 2 && i != pos)
        ot = s[i] - '0';
    }
    if (n == 1 || pos == -1)
      cout << -1 << "\n";
    else if (pos1 == -1) {
      if (n % 2 == 0)
        cout << s << "\n";
      else {
        s.erase(s.begin() + 0);
        cout << s << "\n";
      }
    } else if (ot != -1)
      cout << ot * 10 + num << "\n";
    else if (ot == -1)
      cout << -1 << "\n";
  }
}
