#include <bits/stdc++.h>
using namespace std;
template <class T>
T Abs(T x) {
  return x > 0 ? x : -x;
}
template <class T>
T Max(T a, T b) {
  return a > b ? a : b;
}
template <class T>
T Min(T a, T b) {
  return a < b ? a : b;
}
template <class T>
T gcd(T a, T b) {
  return (b ? gcd(b, a % b) : a);
}
bool isVowel(char ch) {
  ch = tolower(ch);
  return (ch == 'a' || ch == 'e' || ch == 'i' || ch == 'o' || ch == 'u');
}
char get_new_letter(char a, char b) {
  for (char c = 'a'; c <= 'z'; c++)
    if (c != a and c != b) return c;
}
int main() {
  ios_base ::sync_with_stdio(0);
  cin.tie(0);
  int i, j, k, n, m, t;
  while (cin >> n >> t) {
    string s1, s2, s3;
    cin >> s1 >> s2;
    for (int i = (0); i < (n); ++i) s3 += get_new_letter(s1[i], s2[i]);
    vector<int> same, different;
    for (int i = (0); i < (n); ++i) {
      if (s1[i] == s2[i])
        same.push_back(i);
      else
        different.push_back(i);
    }
    while (t < n) {
      if ((int)(same).size() >= 1) {
        i = same.back();
        same.pop_back();
        s3[i] = s1[i];
        t++;
      } else if ((int)(different).size() >= 2) {
        i = different.back();
        different.pop_back();
        j = different.back();
        different.pop_back();
        s3[i] = s1[i];
        s3[j] = s2[j];
        t++;
      } else {
        s3 = "-1";
        break;
      }
    }
    cout << s3 << '\n';
  }
  return 0;
}
