#include <bits/stdc++.h>
using namespace std;
signed main() {
  int t;
  cin >> t;
  while (t--) {
    int n;
    cin >> n;
    string s;
    cin >> s;
    int q = n - 1;
    int w = 0;
    string a = "00";
    for (int i = q; i >= 0; i--) {
      if (s[i] == '1' || s[i] == '3' || s[i] == '5' || s[i] == '7' ||
          s[i] == '9') {
        a[1] = s[i];
        w++;
        q = i - 1;
        break;
      }
    }
    for (int i = q; i >= 0; i--) {
      if (s[i] == '1' || s[i] == '3' || s[i] == '5' || s[i] == '7' ||
          s[i] == '9') {
        a[0] = s[i];
        w++;
        q = i;
        break;
      }
    }
    if (w == 2) {
      cout << a << "\n";
    } else {
      cout << "-1\n";
    }
  }
}
