#include <bits/stdc++.h>
using namespace std;
int main() {
  int t;
  cin >> t;
  while (t--) {
    int n;
    cin >> n;
    string s;
    cin >> s;
    long long cnt = 0;
    for (int i = 0; i < n; i++) {
      long long t = s[i] - 48;
      if (t % 2 != 0) {
        cnt++;
      }
    }
    if (cnt <= 1) {
      cout << "-1"
           << "\n";
    } else {
      long long cn = 0;
      for (int i = 0; i < n; i++) {
        long long t = s[i] - 48;
        if (t % 2 != 0) {
          cn++;
        }
        cout << t;
        if (cn == 2) {
          break;
        }
      }
      cout << "\n";
    }
  }
  return 0;
}
