#include <bits/stdc++.h>
using namespace std;
int main() {
  string s1, s2;
  char s3[105] = {'0'};
  cin >> s1;
  cin >> s2;
  int temp1, temp2, flag = 0, count = 0;
  char m, n;
  int len = s1.length();
  for (int i = 0; i < len; i++) {
    if (count > len) {
      break;
    }
    m = s1[i];
    n = s2[i];
    temp1 = (int)m;
    temp2 = (int)n;
    if (n > m) {
      flag = 1;
      break;
    } else {
      if (m <= n) {
        s3[i] = s1[i];
        count++;
      } else {
        s3[i] = s2[i];
        count++;
      }
    }
  }
  if (flag == 1 || count < len || count > len) {
    cout << "-1";
  } else {
    for (int i = 0; i < len; i++) {
      printf("%c", s3[i]);
    }
  }
}
