#include <bits/stdc++.h>
using namespace std;
int main() {
  int t;
  cin >> t;
  while (t--) {
    int n;
    cin >> n;
    string a;
    cin >> a;
    int flag = 1;
    for (int i = 0; i < n; i++) {
      if (a[i] == '0')
        continue;
      else {
        for (int j = i; j < n; ++j) {
          int kk = 0;
          if ((a[j] - '0') % 2 == 0) continue;
          for (int k = i; k <= j; ++k) {
            kk = kk + a[k] - '0';
          }
          if (kk % 2 == 0) {
            flag = 0;
            for (int hh = i; hh <= j; hh++) {
              cout << a[hh];
            }
            cout << endl;
            break;
          }
          if (flag == 0) break;
        }
      }
      if (flag == 0) break;
    }
    if (flag == 1) cout << -1 << endl;
  }
}
