#include <bits/stdc++.h>
using namespace std;
long long a[4000];
signed main() {
  long long T;
  cin >> T;
  while (T--) {
    long long n;
    cin >> n;
    string a;
    cin >> a;
    string b;
    long long flag1 = 0, flag2 = 0, flag3 = 0;
    for (long long i = a.size() - 1; i >= 0; i--) {
      if ((a[i] - '0') % 2 == 1 && flag1 == 0) {
        flag1 = 1;
        b += a[i];
        continue;
      }
      if (flag1 == 1 && (a[i] - '0') % 2 == 1) {
        flag2 = 1;
        b += a[i];
        break;
      }
    }
    if (flag2 == 1) {
      for (long long i = b.size() - 1; i >= 0; i--) {
        cout << b[i];
      }
      cout << endl;
    } else {
      printf("-1\n");
    }
  }
  return 0;
}
