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