#include <bits/stdc++.h>
using namespace std;
int main() {
  long long t;
  cin >> t;
  while (t--) {
    long long n, sum = 0, lastdig, odd = 0, c = 0;
    cin >> n;
    string s, ans;
    cin >> s;
    for (long long i = 0; i < n; i++) {
      string z = "a";
      z[0] = s[i];
      long long y = stoi(z);
      c += y;
      if (y % 2 == 1 && c != 0 && c % 2 == 0) {
        ans.append(z);
        break;
      } else
        ans.append(z);
    }
    string z = "a";
    z[0] = ans[ans.size() - 1];
    long long y = stoi(z);
    if (c != 0 && c % 2 == 0 && y % 2 == 1) {
      cout << ans;
    } else
      cout << -1;
    cout << "\n";
  }
}
