#include <bits/stdc++.h>
using namespace std;
const int mod = 1e9 + 7;
const int maxn = 1e6 + 5;
const int inf = 0x3f3f3f3f;
const long long INF = 0x3f3f3f3f3f3f3f3f;
void header() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
}
char s[maxn];
int cnt[15];
void solve() {
  int t, n;
  cin >> t;
  while (t--) {
    memset(cnt, 0, sizeof(cnt));
    cin >> n;
    cin >> s;
    vector<int> v;
    for (int i = 0; i < n; i++) {
      if ((s[i] - '0') & 1) v.push_back(s[i] - '0');
    }
    if (v.size() < 2)
      cout << "-1\n";
    else {
      for (int i = 0; i < v.size() / 2 * 2; i++) cout << v[i];
      cout << "\n";
    }
  }
}
int main() {
  header();
  solve();
  return 0;
}
