#include <bits/stdc++.h>   using namespace std;   void print(vector<int> v) {     for (int i = 0; i < v.size(); i++) {       if (v[i] != 0) {         cout << v[i];       }     }     cout << endl;   }   void solve(vector<int>& v, int even, int odd) {     if (v.size() == 1) {       cout << -1 << endl;       return;     } else if (v.size() == 2) {       if (odd != 2) {         cout << -1 << endl;         return;       } else {         print(v);         return;       }     } else if (odd == 0) {       cout << -1 << endl;       return;     } else {       while (v[v.size() - 1] % 2 == 0) {         v.pop_back();         even--;       }       if (odd == 1) {         cout << -1 << endl;         return;       } else if (odd % 2 == 0) {         print(v);         return;       } else {         for (int i = 0; i < v.size(); i++) {           if (v[i] % 2 == 1) {             v.erase(v.begin() + i);             print(v);             return;           }         }       }     }   }   int main() {     int t;     cin >> t;     while (t--) {       int e = 0, o = 0;       int n;       cin >> n;       string s;       cin >> s;       vector<int> v(n);       for (int i = 0; i < s.size(); i++) {         v[i] = s[i] - 48;         if (v[i] % 2 == 0)           e++;         else           o++;       }       solve(v, e, o);     }   }   