#include <bits/stdc++.h>
using namespace std;
const int mod = 1e9 + 7;
const int MAXN = 1e5 + 9;
string a;
int main() {
  ios::sync_with_stdio(false);
  cin.tie(0), cout.tie(0);
  int t;
  cin >> t;
  while (t--) {
    int n;
    cin >> n;
    cin >> a;
    int cnt1 = 0, cnt2 = 0, cnt = 0;
    for (int i = 0; i < n; i++) {
      if ((a[i] - '0') % 2 == 0)
        cnt2++;
      else
        cnt1++;
    }
    if (cnt1 == 0 || cnt1 == 1) {
      cout << -1 << endl;
      continue;
    } else {
      for (int i = 0; i < n; i++) {
        if ((a[i] - '0') % 2) {
          cout << a[i];
          cnt++;
        }
        if (cnt == 2) break;
      }
      cout << endl;
    }
  }
  return 0;
}
