#include <bits/stdc++.h>
using namespace std;
const int INF = 2147483647;
const long long LONGINF = 9223372036854775807;
const long long MOD = 998244353;
void solve() {
  int n;
  string s;
  cin >> n >> s;
  int nechet1 = -1, nechet2 = -1;
  for (auto& i : s) {
    if ((i - '0') % 2 != 0) {
      if (nechet1 == -1)
        nechet1 = i - '0';
      else
        nechet2 = i - '0';
    }
  }
  if (nechet1 == -1 || nechet2 == -1)
    cout << -1 << '\n';
  else
    cout << nechet1 << nechet2 << '\n';
}
signed main() {
  cin.tie(0);
  cout.tie(0);
  std::ios_base::sync_with_stdio(0);
  bool mult = true;
  if (mult) {
    int t;
    cin >> t;
    while (t--) solve();
  } else
    solve();
}
