#include <bits/stdc++.h>
using namespace std;
const int INF = 2e9 + 10;
const int MOD = 1e9 + 7;
const int N = 1e6 + 10;
int n, k, m;
string x, y, z;
int main() {
  ios_base::sync_with_stdio(0);
  cout.tie(0);
  cin.tie(0);
  cin >> x >> y;
  n = x.length();
  int ans = 1;
  for (int i = 0; i < n; i++) {
    if (y[i] > x[i]) {
      cout << -1;
      return 0;
    }
    z += min(x[i], y[i]);
  }
  cout << z;
  return 0;
}
