#include <bits/stdc++.h>
using namespace std;
signed main() {
  long long t;
  cin >> t;
  while (t--) {
    long long n, a = -1, b = -1;
    cin >> n;
    string s;
    cin >> s;
    for (long long i = n - 1; i >= 0; i--) {
      if ((s[i] - '0') % 2 != 0) {
        b = i;
        break;
      }
    }
    for (long long i = 0; i < b; i++) {
      if ((s[i] - '0') % 2 != 0) {
        a = i;
        break;
      }
    }
    if (a == -1 || b == -1)
      cout << "-1" << endl;
    else
      cout << s[a] << s[b] << endl;
  }
}
