#include <bits/stdc++.h>
const int OO = INT_MAX;
using namespace std;
void Yuko_Kurama() {
  cin.tie(0);
  ios::sync_with_stdio(false);
}
string n2s(long long n) {
  ostringstream con;
  con << n;
  return con.str();
}
int main() {
  Yuko_Kurama();
  int n, k;
  string s, t;
  while (cin >> s >> t) {
    string ans;
    for (int i = 0; i < s.size(); i++) {
      if (s[i] > t[i])
        ans.push_back(t[i]);
      else if (s[i] == t[i])
        ans.push_back(s[i]);
      else {
        ans.clear(), ans.push_back('-'), ans.push_back('1');
        break;
      }
    }
    cout << ans << endl;
  }
  return 0;
}
