#include <bits/stdc++.h>
using namespace std;
const int mod = 1e9 + 7;
const int MAX = 1e5 + 7;
string x, y;
int main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  cin >> x >> y;
  string z;
  int len = x.size();
  for (int i = 0; i < len; i++) {
    if (x[i] >= y[i]) {
      z.push_back(y[i]);
    } else if (x[i] < y[i]) {
      cout << -1;
      return 0;
    }
  }
  cout << z;
}
