#include <bits/stdc++.h>
using namespace std;
using ll = long long;

int main() {
    ios::sync_with_stdio(false);
    cin.tie(nullptr);
    int n, t;
    string a, b;
    cin >> n >> t >> a >> b;
    vector<int> same, diff;
    for (int i = 0; i < n; i++)
        (a[i] == b[i] ? same : diff).push_back(i);
    int d = diff.size(), x = -1, e = 0;
    for (int k = 0; 2 * k <= d; k++)
        if (t - d + k >= 0 && t - d + k <= (int)same.size()) {
            x = k;
            e = t - d + k;
            break;
        }
    if (x < 0) {
        cout << -1 << '\n';
        return 0;
    }
    string c = a;
    auto third = [](char x, char y) {
        for (char z = 'a';; z++)
            if (z != x && z != y)
                return z;
    };
    for (int k = 0; k < d; k++) {
        int i = diff[k];
        c[i] = k < x ? a[i] : k < 2 * x ? b[i] : third(a[i], b[i]);
    }
    for (int k = 0; k < e; k++)
        c[same[k]] = third(a[same[k]], b[same[k]]);
    cout << c << '\n';
}
