#include <bits/stdc++.h>
using namespace std;
char s[200000];
signed main() {
  ios::sync_with_stdio(0);
  long long T;
  cin >> T;
  while (T--) {
    long long n;
    cin >> n;
    cin >> s + 1;
    n = strlen(s + 1);
    while (n >= 1 && (s[n] - '0') % 2 == 0) n--;
    if (!n) {
      cout << -1 << endl;
    } else {
      long long now = 0;
      for (long long i = 1; i <= n; i++) now += s[i] - '0';
      if (now % 2 == 0) {
        for (long long i = 1; i <= n; i++) cout << s[i];
        cout << endl;
      } else {
        long long del = -1;
        for (long long i = 1; i < n; i++)
          if ((s[i] - '0') % 2 == 1) del = i;
        if (del == -1) {
          cout << -1 << endl;
        } else {
          for (long long i = 1; i <= n; i++)
            if (i != del) cout << s[i];
          cout << endl;
        }
      }
    }
  }
  getchar();
  getchar();
}
