#include <bits/stdc++.h>
using namespace std;
int n, T;
vector<int> v;
void A() {
  cin >> T;
  for (int t = 0; t < T; ++t) {
    bool found = false;
    cin >> n;
    v.resize(n);
    for (int i = 0; i < n; ++i) cin >> v[i];
    for (int i = 0; i < n - 1; ++i) {
      if (v[i] > i) {
        v[i + 1] += (v[i] - i);
        v[i] = i;
      }
      if (v[i + 1] > v[i])
        continue;
      else {
        found = true;
        cout << "NO\n";
        break;
      }
    }
    if (!found) cout << "YES\n";
  }
}
int getMed(int i, int j, vector<int> v2) {
  i = min(i, n);
  j = min(j, n);
  sort(v2.begin() + i, v2.begin() + j + 1);
  int x;
  if (i == 0)
    x = ((j - i + 2) / 2) - 1;
  else
    x = ((j - i + 2) / 2);
  int Median = v2[x];
  return Median;
}
void D() {
  int k;
  cin >> n >> k;
  vector<int> v2;
  v2.resize(n);
  for (int i = 0; i < n; ++i) cin >> v2[i];
  int i = 0, j = 0, c = 0, mx = -1;
  while (i < n && j < n) {
    if (c >= k) {
      mx = max(mx, getMed(i, j, v2));
      i++;
      c--;
    } else {
      j++;
      c++;
    }
  }
  cout << mx << "\n";
}
bool isLucky(int n) {
  string s = to_string(n);
  for (int i = 0; i < s.size(); ++i) {
    if (s[i] != '4' && s[i] != '7') return false;
  }
  return true;
}
void A_Lucky_Division() {
  cin >> n;
  for (int i = 1; i <= n; ++i) {
    if (isLucky(i) && n % i == 0) {
      cout << "YES\n";
      return;
    }
  }
  cout << "NO\n";
}
bool is_2_power(int n) { return (ceil(log2(n)) == floor(log2(n))); }
void AYou_Are_Given_Two_Binary_Strings() {
  cin >> T;
  for (int t = 0; t < T; ++t) {
    string s, t2;
    cin >> s >> t2;
    bitset<32> m1(s);
    bitset<32> m2(t2);
    int x = m1.to_ulong();
    int y = m2.to_ulong(), z = x + y;
    cout << "x : " << x << "  " << y << endl;
    while (!is_2_power(z)) {
      z++;
    }
    cout << "z   :  " << z << endl;
    int h = z - x - y;
    if (h == 0)
      cout << "0\n";
    else
      cout << log2(h) << endl;
  }
}
void keyboard() {
  string s;
  cin >> s;
  int vk = 0, other = 0;
  for (int i = 0; i < s.size() - 1; i++) {
    if (s[i] == 'V' && s[i + 1] == 'K') {
      vk++;
      s[i] = '.';
      s[i + 1] = '.';
    }
  }
  for (int i = 0; i < s.size() - 1; i++) {
    if ((s[i] == 'V' && s[i + 1] == 'V') || (s[i] == 'K' && s[i + 1] == 'K')) {
      other++;
      break;
    }
  }
  other > 0 ? cout << vk + 1 : cout << vk;
  cout << "\n";
}
void B_Valued_Keys() {
  string x, z, y = "";
  cin >> x >> z;
  for (int i = 0; i < x.size(); ++i) {
    if (z[i] > x[i]) {
      cout << "-1\n";
      return;
    } else if (z[i] == x[i]) {
      y += x[i];
    } else
      y += z[i];
  }
  cout << y << "\n";
}
int main() {
  ios::sync_with_stdio(false), cin.tie(nullptr);
  B_Valued_Keys();
  return 0;
}
