#include <bits/stdc++.h>
using namespace std;
void in() {}
int main() {
  int t;
  cin >> t;
  while (t--) {
    int n;
    cin >> n;
    string s, t;
    cin >> s;
    long long sum = 0;
    for (int i = 0; i < n; ++i) {
      sum += s[i] - '0';
    }
    for (int i = 0; i < n; ++i)
      if ((s[i] - '0') % 2 == 1) t += s[i];
    if (sum % 2 == 1) t.erase(t.begin());
    if (t.size() == 0) {
      cout << -1 << "\n";
      continue;
    }
    cout << t << "\n";
  }
}
