#include <bits/stdc++.h>
using namespace std;
char diff(char a, char b) {
  if (a != 'a' && b != 'a') {
    return 'a';
  }
  if (a != 'b' && b != 'b') {
    return 'b';
  }
  if (a != 'c' && b != 'c') {
    return 'c';
  }
}
int main() {
  int n, m;
  cin >> n >> m;
  string a, b;
  cin >> a >> b;
  int sim = 0;
  vector<int> locs;
  for (int i = 0; i < n; i++) {
    if (a[i] == b[i]) {
      sim++;
      locs.push_back(i);
    }
  }
  int aa = n - m;
  int bb = n - m;
  string res = "";
  for (int i = 0; i < n; i++) {
    res += diff(a[i], b[i]);
  }
  for (int i = 0; aa > 0 && i < locs.size(); i++) {
    res[locs[i]] = a[locs[i]];
    aa--;
    bb--;
  }
  if (aa != 0 || bb != 0)
    for (int i = 0; i < n; i++) {
      if (a[i] == b[i]) {
        continue;
      } else {
        if (aa > bb && aa > 0) {
          res[i] = a[i];
          aa--;
        } else if (bb > 0) {
          res[i] = b[i];
          bb--;
        }
      }
    }
  int aaa = n - m, bbb = n - m;
  for (int i = 0; i < n; i++) {
    if (res[i] == a[i]) aaa--;
  }
  for (int i = 0; i < n; i++) {
    if (res[i] == b[i]) bbb--;
  }
  if (aaa == 0 && bbb == 0)
    cout << res << endl;
  else
    cout << -1 << endl;
  return 0;
}
