#include <bits/stdc++.h>
using namespace std;
int main() {
  string a, b;
  while (cin >> a) {
    cin >> b;
    string z = b;
    int sz = a.size();
    bool ok = true;
    for (int i = 0; i < sz; i++) {
      if (a[i] > b[i]) {
        z[i] = b[i];
      } else if (a[i] == b[i]) {
        z[i] = a[i];
      } else {
        ok = false;
        break;
      }
    }
    if (!ok) {
      cout << "-1" << endl;
    } else {
      cout << z << endl;
    }
  }
  return 0;
}
