/* */
#include <cstdio>
#include <cstring>
#include <cassert>
#include <cmath>
#include <string>
#include <algorithm>
#include <vector>
#include <queue>
#include <bitset>
#include <map>
#include <set>
const int MAX_LEN = 1010;
#define GETLINE(x) fgets(x,MAX_LEN,stdin);
using namespace std;
typedef long long int ll;
typedef vector<int> vi;
typedef pair<int, int> ii;
typedef pair<ll, ll> pll;
typedef pair<double, double> dd;
typedef tuple<int, int, int> iii;
typedef vector<ii> vii;
typedef vector<ll> vll;
#ifdef XVENOM
	#define errp(...) fprintf(stderr, __VA_ARGS__)
	#define dbg(...) errp("[%s]: ", #__VA_ARGS__), dbg_str(__VA_ARGS__)
#else
	#define errp(...)
	#define dbg(...)
#endif
template <typename U, typename V> string to_string (pair<U, V>);
string to_string (const string& e_) { return "\"" + e_ + "\""; }
string to_string (char e_) { return "\'" + string(1, e_) + "\'"; }
string to_string (bool e_) { return e_ ? "true" : "false"; }
template <typename T> string to_string (T e_) {
	string s_ = "[ ";
	for (const auto& x_ : e_) s_ += to_string(x_) + " ";
	return s_ + "]";
}
template <typename U, typename V> string to_string (pair<U, V> e_) {
	return "(" + to_string(e_.first) + ", " + to_string(e_.second) + ")";
}
void dbg_str () { errp(" \n"); }
template <typename U, typename... V> void dbg_str (U u, V... v) {
 	errp(" %s", to_string(u).c_str()); dbg_str(v...);
}
/* --- */
const int N=100100;
int n,tx,cmmn;
set<int> cindx;
char s[N],t[N],ans[N];
int main () {
	scanf("%d %d",&n,&tx);
	scanf("%s",s);
	scanf("%s",t);
	for(int i=0;s[i];i++){
		if(s[i]==t[i])cindx.insert(i);
	}
	if(2*tx-(int)cindx.size()>n){printf("-1\n");exit(0);}
	for(int i=0;i<n;i++){
		if(cindx.count(i)==1){
			for(char cur='a';cur<='z';cur++)
			if(cur!=s[i])
				{ans[i]=cur;break;}
		}
	}
	tx-=(int)cindx.size();
	int xz=tx;
	int i=0;
	while(tx--){
		while(cindx.count(i)==1)i++;
		ans[i]=s[i];
		i++;
	}
	tx=xz;
	while(tx--){
		while(cindx.count(i)==1)i++;
		ans[i]=t[i];
		i++;
	}
	for(int i=0;i<n;i++)
		printf("%c",ans[i]);
}


/* */
#include <cstdio>
#include <cstring>
#include <cassert>
#include <cmath>
#include <string>
#include <algorithm>
#include <vector>
#include <queue>
#include <bitset>
#include <map>
#include <set>
const int MAX_LEN = 1010;
#define GETLINE(x) fgets(x,MAX_LEN,stdin);
using namespace std;
typedef long long int ll;
typedef vector<int> vi;
typedef pair<int, int> ii;
typedef pair<ll, ll> pll;
typedef pair<double, double> dd;
typedef tuple<int, int, int> iii;
typedef vector<ii> vii;
typedef vector<ll> vll;
#ifdef XVENOM
	#define errp(...) fprintf(stderr, __VA_ARGS__)
	#define dbg(...) errp("[%s]: ", #__VA_ARGS__), dbg_str(__VA_ARGS__)
#else
	#define errp(...)
	#define dbg(...)
#endif
template <typename U, typename V> string to_string (pair<U, V>);
string to_string (const string& e_) { return "\"" + e_ + "\""; }
string to_string (char e_) { return "\'" + string(1, e_) + "\'"; }
string to_string (bool e_) { return e_ ? "true" : "false"; }
template <typename T> string to_string (T e_) {
	string s_ = "[ ";
	for (const auto& x_ : e_) s_ += to_string(x_) + " ";
	return s_ + "]";
}
template <typename U, typename V> string to_string (pair<U, V> e_) {
	return "(" + to_string(e_.first) + ", " + to_string(e_.second) + ")";
}
void dbg_str () { errp(" \n"); }
template <typename U, typename... V> void dbg_str (U u, V... v) {
 	errp(" %s", to_string(u).c_str()); dbg_str(v...);
}
/* --- */
const int N=100100;
int n,tx,cmmn;
set<int> cindx;
char s[N],t[N],ans[N];
int main () {
	scanf("%d %d",&n,&tx);
	scanf("%s",s);
	scanf("%s",t);
	if(strcmp(s,t)==0){
		for(int i=0;i<tx;i++){
			for(char cur='a';cur<='z';cur++)
				if(cur!=s[i])
					{ans[i]=cur;break;}
		}
		for(int i=tx;i<n;i++)
			ans[i]=s[i];
		for(int i=0;i<n;i++)
			printf("%c",ans[i]);
		exit(0);
	}
	for(int i=0;s[i];i++){
		if(s[i]==t[i])cindx.insert(i);
	}
	if(2*tx-(int)cindx.size()>n || 2*tx+(int)cindx.size()<n){printf("-1\n");exit(0);}
	if(2*tx>n){
		for(int i=0;i<n;i++){
			if(cindx.count(i)==1){
				for(char cur='a';cur<='z';cur++)
				if(cur!=s[i])
					{ans[i]=cur;break;}
			}
		}
		tx-=(int)cindx.size();
		int xz=tx;
		int i=0;
		while(tx--){
			while(cindx.count(i)==1)i++;
			ans[i]=s[i];
			i++;
		}
		tx=xz;
		while(tx--){
			while(cindx.count(i)==1)i++;
			ans[i]=t[i];
			i++;
		}
	}
	else {
			for(int i=0;i<n;i++){
			if(cindx.count(i)==0){
				for(char cur='a';cur<='z';cur++)
				if(cur!=s[i] && cur!=t[i])
					{ans[i]=cur;break;}
				}
			}
	}
	for(int i=0;i<n;i++)
		printf("%c",ans[i]);
}


/* */
#include <cstdio>
#include <cstring>
#include <cassert>
#include <cmath>
#include <string>
#include <algorithm>
#include <vector>
#include <queue>
#include <bitset>
#include <map>
#include <set>
const int MAX_LEN = 1010;
#define GETLINE(x) fgets(x,MAX_LEN,stdin);
using namespace std;
typedef long long int ll;
typedef vector<int> vi;
typedef pair<int, int> ii;
typedef pair<ll, ll> pll;
typedef pair<double, double> dd;
typedef tuple<int, int, int> iii;
typedef vector<ii> vii;
typedef vector<ll> vll;
#ifdef XVENOM
	#define errp(...) fprintf(stderr, __VA_ARGS__)
	#define dbg(...) errp("[%s]: ", #__VA_ARGS__), dbg_str(__VA_ARGS__)
#else
	#define errp(...)
	#define dbg(...)
#endif
template <typename U, typename V> string to_string (pair<U, V>);
string to_string (const string& e_) { return "\"" + e_ + "\""; }
string to_string (char e_) { return "\'" + string(1, e_) + "\'"; }
string to_string (bool e_) { return e_ ? "true" : "false"; }
template <typename T> string to_string (T e_) {
	string s_ = "[ ";
	for (const auto& x_ : e_) s_ += to_string(x_) + " ";
	return s_ + "]";
}
template <typename U, typename V> string to_string (pair<U, V> e_) {
	return "(" + to_string(e_.first) + ", " + to_string(e_.second) + ")";
}
void dbg_str () { errp(" \n"); }
template <typename U, typename... V> void dbg_str (U u, V... v) {
 	errp(" %s", to_string(u).c_str()); dbg_str(v...);
}
/* --- */
const int N=100100;
int n,tx,cmmn;
set<int> cindx;
char s[N],t[N],ans[N];
int main () {
	scanf("%d %d",&n,&tx);
	scanf("%s",s);
	scanf("%s",t);
	for(int i=0;s[i];i++){
		if(s[i]==t[i])cindx.insert(i);
	}
	if(2*tx-(int)cindx.size()>n || 2*tx+(int)cindx.size()<n){printf("-1\n");exit(0);}
	if(2*tx>n){
		for(int i=0;i<n;i++){
			if(cindx.count(i)==1){
				for(char cur='a';cur<='z';cur++)
				if(cur!=s[i])
					{ans[i]=cur;break;}
			}
		}
		tx-=(int)cindx.size();
		int xz=tx;
		int i=0;
		while(tx--){
			while(cindx.count(i)==1)i++;
			ans[i]=s[i];
			i++;
		}
		tx=xz;
		while(tx--){
			while(cindx.count(i)==1)i++;
			ans[i]=t[i];
			i++;
		}
	}
	else {
			for(int i=0;i<n;i++){
			if(cindx.count(i)==0){
				for(char cur='a';cur<='z';cur++)
				if(cur!=s[i] && cur!=t[i])
					{ans[i]=cur;break;}
				}
			}
	}
	for(int i=0;i<n;i++)
		printf("%c",ans[i]);
}


/* */
#include <cstdio>
#include <cstring>
#include <cassert>
#include <cmath>
#include <string>
#include <algorithm>
#include <vector>
#include <queue>
#include <bitset>
#include <map>
#include <set>
const int MAX_LEN = 1010;
#define GETLINE(x) fgets(x,MAX_LEN,stdin);
using namespace std;
typedef long long int ll;
typedef vector<int> vi;
typedef pair<int, int> ii;
typedef pair<ll, ll> pll;
typedef pair<double, double> dd;
typedef tuple<int, int, int> iii;
typedef vector<ii> vii;
typedef vector<ll> vll;
#ifdef XVENOM
	#define errp(...) fprintf(stderr, __VA_ARGS__)
	#define dbg(...) errp("[%s]: ", #__VA_ARGS__), dbg_str(__VA_ARGS__)
#else
	#define errp(...)
	#define dbg(...)
#endif
template <typename U, typename V> string to_string (pair<U, V>);
string to_string (const string& e_) { return "\"" + e_ + "\""; }
string to_string (char e_) { return "\'" + string(1, e_) + "\'"; }
string to_string (bool e_) { return e_ ? "true" : "false"; }
template <typename T> string to_string (T e_) {
	string s_ = "[ ";
	for (const auto& x_ : e_) s_ += to_string(x_) + " ";
	return s_ + "]";
}
template <typename U, typename V> string to_string (pair<U, V> e_) {
	return "(" + to_string(e_.first) + ", " + to_string(e_.second) + ")";
}
void dbg_str () { errp(" \n"); }
template <typename U, typename... V> void dbg_str (U u, V... v) {
 	errp(" %s", to_string(u).c_str()); dbg_str(v...);
}
/* --- */
const int N=100100;
int n,tx,cmmn;
char s[N],t[N],ans[N];
int main () {
	scanf("%d %d",&n,&tx);
	scanf("%s",s);
	scanf("%s",t);
	for(int i=0;s[i];i++){
		if(s[i]==t[i])cmmn++;
	}
	if(2*tx-cmmn>n){printf("-1\n");exit(0);}
	for(int i=0;i<n;i++){
		for(char cur='a';cur<='z';cur++)
			if(cur!=s[i] && cur!=t[i])
				{ans[i]=cur;break;}
	}
	for(int i=0;i<n;i++)
		printf("%c",ans[i]);
}


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

#define ll long long
#define sc(n) scanf("%d",&n);
#define print(n) printf("%d \n",n);
#define pb push_back
#define mp make_pair
#define fi first
#define se second
#define debug(x) cout<<#x<<" = "<<x<<"\n"
#define all(x) (x).begin(), (x).end()

const int MOD = 1000000007;

int main(){
    ios_base::sync_with_stdio(false);
    cin.tie(NULL); cout.tie(NULL);
    int n,t,same=0;
    cin>>n>>t;
    string s1,s2,ans="";
    cin>>s1>>s2;
    for(int i=0;i<n;i++){
        if(s1[i]==s2[i]) same++;
    }
    int k = n-same,d1=t,d2=t;
    if(t<ceil(k/2) || (n==1 && t==0)){
        cout<<"-1\n";
        return 0;
    }
    int d3=t-k,total;
    if(t==k/2) total=0;
    else if(t>k) total=t;
    else{
        int target = k-t;
        total=k-2*target;
    }
    for(int i=0;i<n;i++){
        if(total>0){
            if(s1[i]!='a' && s2[i]!='a') ans+="a";
            else if(s1[i]!='b' && s2[i]!='b') ans+="b";
            else ans+="c";
            total--;
            d1--;
            d2--;
            if(s1[i]==s2[i]) d3--;
        }else if(s1[i]==s2[i]){
            if(d3<=0) {ans+=s1[i];continue;}
            if(s1[i]=='a') ans+="b";
            else ans+="a";
            d3--;
            d1--;
            d2--;
            total--;
        }else if(s1[i]!=s2[i]){
            if(d1){
                ans+=s2[i];
                d1--;
            }else if(d2){
                ans+=s1[i];
                d2--;
            }
        }
    }
    cout<<ans<<"\n";
    return 0;
}


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

#define ll long long
#define sc(n) scanf("%d",&n);
#define print(n) printf("%d \n",n);
#define pb push_back
#define mp make_pair
#define fi first
#define se second
#define debug(x) cout<<#x<<" = "<<x<<"\n"
#define all(x) (x).begin(), (x).end()

const int MOD = 1000000007;

int main(){
    ios_base::sync_with_stdio(false);
    cin.tie(NULL); cout.tie(NULL);
    int n,t,same=0;
    cin>>n>>t;
    string s1,s2,ans="";
    cin>>s1>>s2;
    for(int i=0;i<n;i++){
        if(s1[i]==s2[i]) same++;
    }
    int k = n-same,d1=t,d2=t;
    if(t<ceil(k/2) || (n==1 && t==0)){
        cout<<"-1\n";
        return 0;
    }
    int d3=t-k,total;
    if(t==k/2) total=0;
    else if(t>k) total=t;
    else{
        int target = k-t;
        total=k-2*target;
    }
    for(int i=0;i<n;i++){
        if(total>0){
            if(s1[i]!='a' && s2[i]!='a') ans+="a";
            else if(s1[i]!='b' && s2[i]!='b') ans+="b";
            else ans+="c";
            total--;
        }else if(s1[i]==s2[i]){
            if(d3<=0) {ans+=s1[i];continue;}
            if(s1[i]=='a') ans+="b";
            else ans+="a";
            d3--;
            d1--;
            d2--;
            total--;
        }else if(s1[i]!=s2[i]){
            if(d1){
                ans+=s2[i];
                d1--;
            }else if(d2){
                ans+=s1[i];
                d2--;
            }
        }
    }
    cout<<ans<<"\n";
    return 0;
}


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

int main(){
    int n,t,same=0;
    cin>>n>>t;
    string s1,s2;
    cin>>s1>>s2;
    for(int i=0;i<n;i++){
        if(s1[i]==s2[i]) same++;
    }
    char *ans = new char[n];
    int k = n - same;
    float p = ceil(k/2);
    if(t<ceil(k*1.0/2) || (n==1 && t==0)){
        cout<<"-1\n";
        return 0;
    }
    int d3=t-k,diff=k;
    for(int i=0;i<n;i++){
    		if(s1[i]==s2[i] && d3>0){
    			d3--;
    			t--;
    			if(s1[i]=='a') ans[i]='b';
    			else ans[i]='a';
    		}else if(s1[i]==s2[i] && d3<=0) ans[i]=s1[i];
    	}
    int d1=t,d2=t;
    int total = 2*t - diff;
    for(int i=0;i<n;i++){
    	if(s1[i]!=s2[i]){
    		if(total>0){
    			if(s1[i]!='a' && s2[i]!='a') ans[i]='a';
	            else if(s1[i]!='b' && s2[i]!='b') ans[i]='b';
	            else ans[i]='c';
	            total--;
	            d1--;
	            d2--;
	    	}else if(d1>0){
	    		ans[i]=s2[i];
                d1--;
	    	}else if(d2){
                ans[i]=s1[i];
                d2--;
            }
    	}
    }
    for(int i=0;i<n;i++) cout<<ans[i];
    cout<<"\n";
    return 0;
}


#include<bits/stdc++.h>

using namespace std;

const char dif(char a, char b);

int main(){
	ios::sync_with_stdio(0);
	cin.tie(0);
	long n,k;
	string s1,s2;
	cin>>n>>k>>s1>>s2;
	long cnt=0;
	for(int i=0;i<n;++i){
		if(s1[i]!=s2[i])
			cnt++;
	}
	if(cnt%2 || k<cnt/2 || k>n-cnt/2){
		cout<<-1<<endl;
		return 0;
	}
	string s = "";
	int ind=0,cnt2=k-cnt;
	for(int i=0;i<n;++i){
		if(s1[i]==s2[i]){
			if(cnt2>0){
				s+=string(1,s1[i]);
			}
			else {
				s+=string(1,dif(s1[i],s2[i]));
			}
		} else{
			if(ind==0){
				s+=string(1,s1[i]);
				ind = 1;
			}else{
				s+=string(1,s2[i]);
				ind = 0;
			}
		}
	}
	cout<<s<<endl;
}

const char dif(char a, char b){
	for(int i=0;;i++){
		char c = (char)(i+'a');
		if(c != a && c != b)
			return c;
	}
}


#include<bits/stdc++.h>

using namespace std;

const char dif(char a, char b);

int main(){
	ios::sync_with_stdio(0);
	cin.tie(0);
	long n,k;
	string s1,s2;
	cin>>n>>k>>s1>>s2;
	long cnt=0;
	for(int i=0;i<n;++i){
		if(s1[i]!=s2[i])
			cnt++;
	}
	if(cnt%2 || k<cnt/2 || k>n-cnt/2){
		cout<<-1<<endl;
		return 0;
	}
	string s = "";
	int ind=0,cnt2=k-cnt/2;
	for(int i=0;i<n;++i){
		if(s1[i]==s2[i]){
			if(cnt2>0){
				s+=string(1,dif(s1[i],s2[i]));
				cnt2--;
			}
			else {
				s+=string(1,s1[i]);
			}
		} else{
			if(ind==0){
				s+=string(1,s1[i]);
				ind = 1;
			}else{
				s+=string(1,s2[i]);
				ind = 0;
			}
		}
	}
	cout<<s<<endl;
}

const char dif(char a, char b){
	for(int i=0;;i++){
		char c = (char)(i+'a');
		if(c != a && c != b)
			return c;
	}
}


#include<bits/stdc++.h>

using namespace std;

const char dif(char a, char b);

int main(){
	ios::sync_with_stdio(0);
	cin.tie(0);
	long n,k;
	string s1,s2;
	cin>>n>>k>>s1>>s2;
	long cnt=0;
	for(int i=0;i<n;++i){
		if(s1[i]!=s2[i])
			cnt++;
	}
	if(cnt%2 || k<cnt/2 || k>n-cnt/2){
		cout<<-1<<endl;
		return 0;
	}
	string s = "";
	int ind=0,cnt2=k-cnt/2;
	for(int i=0;i<n;++i){
		if(s1[i]==s2[i]){
			if(cnt2>0){
				s+=string(1,dif(s1[i],s2[i]));
			}
			else {
				s+=string(1,s1[i]);
			}
		} else{
			if(ind==0){
				s+=string(1,s1[i]);
				ind = 1;
			}else{
				s+=string(1,s2[i]);
				ind = 0;
			}
		}
	}
	cout<<s<<endl;
}

const char dif(char a, char b){
	for(int i=0;;i++){
		char c = (char)(i+'a');
		if(c != a && c != b)
			return c;
	}
}


#include<bits/stdc++.h>

using namespace std;

char dist(char a, char b) {
	for (int i = 'a';i <= 'z';++i) {
		if ((char) i != a && (char) i != b) {
			return (char) i;
		}
	}
}

int main() {
	ios::sync_with_stdio(0);
	cin.tie(0);
	int n, t;
	cin>>n>>t;
	string s1, s2;
	cin>>s1>>s2;
	int diff = 0;
	for (int i=0;i<n;++i) {
		if (s1[i] != s2[i]) {
			diff++;
		}
	}
	if (t < diff/2 + diff%2) {
		cout<<"-1\n";
		return 0;
	}
	if (diff >= t) {
		int cnt = diff - t;
		string out = "";
		for (int i=0;i<n;++i) {
			if (s1[i] != s2[i]) {
				out.push_back(dist(s1[i], s2[i]));
			} else if (cnt > 0) {
				cnt--;
				out.push_back(dist(s1[i], s2[i]));
			} else {
				out.push_back(s1[i]);
			}
		}
		cout<<out<<"\n";
	} else {
		int ind = 0, cnt = 2*(t - (diff/2 + diff%2)) + diff%2;
		string out = "";
		for (int i = 0;i<n;++i) {
			if (s1[i] == s2[i]) {
				out.push_back(s1[i]);
			} else if (cnt > 0) {
				out.push_back(dist(s1[i], s2[i]));
				cnt--;
			} else {
				if (ind == 0) {
					out.push_back(s1[i]);
					ind = 1;
				} else {
					out.push_back(s2[i]);
					ind = 0;
				}
			}
		}
		cout<<out<<"\n";
	}
	return 0;
}


#include<bits/stdc++.h>

using namespace std;

const char dif(char a, char b);

int main(){
	ios::sync_with_stdio(0);
	cin.tie(0);
	long n,k;
	string s1,s2;
	cin>>n>>k>>s1>>s2;
	long cnt=0;
	for(int i=0;i<n;++i){
		if(s1[i]!=s2[i])
			cnt++;
	}
	if(cnt%2 || k<cnt/2 || k>n-cnt/2){
		cout<<-1<<endl;
		return 0;
	}
	string s = "";
	int ind=0,cnt2=k-cnt;
	for(int i=0;i<n;++i){
		if(s1[i]==s2[i]){
			if(cnt2>0){
				s+=string(1,s1[i]);
			}
			else {
				s+=string(1,dif(s1[i],s2[i]));
			}
		} else{
			if(ind==0){
				s+=string(1,s1[i]);
			}else{
				s+=string(1,s2[i]);
			}
		}
	}
	cout<<s<<endl;
}

const char dif(char a, char b){
	for(int i=0;;i++){
		char c = (char)(i+'a');
		if(c != a && c != b)
			return c;
	}
}


#include<bits/stdc++.h>

using namespace std;

const char dif(char a, char b);

int main(){
	ios::sync_with_stdio(0);
	cin.tie(0);
	long n,k;
	string s1,s2;
	cin>>n>>k>>s1>>s2;
	long cnt=0;
	for(int i=0;i<n;++i){
		if(s1[i]!=s2[i])
			cnt++;
	}
	if(cnt%2 || k<cnt/2 || k>n-cnt/2){
		cout<<-1<<endl;
		return 0;
	}
	string s = "";
	int ind=0,cnt2=k-cnt/2;
	cout<<cnt2<<endl;
	for(int i=0;i<n;++i){
		if(s1[i]==s2[i]){
			if(cnt2>0){
				s+=string(1,dif(s1[i],s2[i]));
				cnt2--;
			}
			else {
				s+=string(1,s1[i]);
			}
		} else{
			if(ind==0){
				s+=string(1,s1[i]);
				ind = 1;
			}else{
				s+=string(1,s2[i]);
				ind = 0;
			}
		}
	}
	cout<<s<<endl;
}

const char dif(char a, char b){
	for(int i=0;;i++){
		char c = (char)(i+'a');
		if(c != a && c != b)
			return c;
	}
}


#include<bits/stdc++.h>

using namespace std;

char dist(char a, char b) {
	for (int i = 'a';i <= 'z';++i) {
		if ((char) i != a && (char) i != b) {
			return (char) i;
		}
	}
}

int main() {
	ios::sync_with_stdio(0);
	cin.tie(0);
	int n, t;
	cin>>n>>t;
	string s1, s2;
	cin>>s1>>s2;
	int diff = 0;
	for (int i=0;i<n;++i) {
		if (s1[i] != s2[i]) {
			diff++;
		}
	}
	if (t < diff/2 + diff%2) {
		cout<<"-1\n";
		return 0;
	}
	if (t >= diff) {
		int cnt = t - diff;
		string out = "";
		for (int i=0;i<n;++i) {
			if (s1[i] != s2[i]) {
				out.push_back(dist(s1[i], s2[i]));
			} else if (cnt > 0) {
				cnt--;
				out.push_back(dist(s1[i], s2[i]));
			} else {
				out.push_back(s1[i]);
			}
		}
		cout<<out<<"\n";
	} else {
		int ind = 0, cnt = 2*(t - (diff/2 + diff%2)) + diff%2;
		string out = "";
		for (int i = 0;i<n;++i) {
			if (s1[i] == s2[i]) {
				out.push_back(s1[i]);
			} else if (cnt > 0) {
				out.push_back(dist(s1[i], s2[i]));
				cnt--;
			} else {
				if (ind == 0) {
					out.push_back(s1[i]);
					ind = 1;
				} else {
					out.push_back(s2[i]);
					ind = 0;
				}
			}
		}
		cout<<out<<"\n";
	}
	return 0;
}


#include<bits/stdc++.h>

using namespace std;

char dist(char a, char b) {
	for (int i = 'a';i <= 'z';++i) {
		if ((char) i != a && (char) i != b) {
			return (char) i;
		}
	}
}

int main() {
	ios::sync_with_stdio(0);
	cin.tie(0);
	int n, t;
	cin>>n>>t;
	string s1, s2;
	cin>>s1>>s2;
	int diff = 0;
	for (int i=0;i<n;++i) {
		if (s1[i] != s2[i]) {
			diff++;
		}
	}
	if (t < diff/2 + diff%2) {
		cout<<"-1\n";
		return 0;
	}
	if (diff >= t) {
		int cnt = diff - t;
		string out = "";
		for (int i=0;i<n;++i) {
			if (s1[i] != s2[i]) {
				out.push_back(dist(s1[i], s2[i]));
			} else if (cnt > 0) {
				cnt--;
				out.push_back(dist(s1[i], s2[i]));
			} else {
				out.push_back(s1[i]);
			}
		}
		cout<<out<<"\n";
	} else {
		int ind = 0, cnt = 2*(t - (diff/2 + diff%2)) + diff%2;
		string out = "";
		for (int i = 0;i<n;++i) {
			if (s1[i] == s2[i]) {
				out.push_back(s1[i]);
			} else if (cnt > 0) {
				out.push_back(dist(s1[i], s2[i]));
				cnt--;
			} else {
				if (ind == 0) {
					out.push_back(s1[i]);
					ind = 1;
				} else {
					out.push_back(s2[i]);
					ind = 0;
				}
			}
		}
	}
	return 0;
}


#include <bits/stdc++.h>
using namespace std;
int main()
{
    int n, m;
    char a[100500], b[100500], c[100500];
    while (scanf("%d %d", &n, &m) != EOF)
    {
        memset(c, '0', sizeof(c));
        scanf("%s", a);
        scanf("%s", b);
        int cnt = 0;
        for (int i = 0; i < n; i++)
        {
            if (a[i] == b[i])
            {
                c[i] = a[i];
                cnt++;
            }
        }
        if (n - cnt >= m)
        {
            if (cnt+(n-cnt)/2<n-m)
                printf("-1\n");
            else
            {
                int cnt1 = n - cnt - m;
                int cnt2 = 0;
                for (int i = 0; i < n; i++)
                {
                    if (a[i] != b[i] && cnt2 < cnt1 * 2)
                    {
                        if (cnt2 < cnt1)
                        {
                            c[i] = a[i];
                            cnt2++;
                        }
                        else
                        {
                            c[i] = b[i];
                            cnt2++;
                        }
                    }
                    if (c[i] != '0')
                        printf("%c", c[i]);
                    else
                    {
                        for (int j = 'a'; j <= 'z'; j++)
                        {
                            if (a[i] != j && b[i] != j)
                            {
                                printf("%c", j);
                                break;
                            }
                        }
                    }
                }
                printf("\n");
            }
        }
        else
        {
            int cnt2 = (n - cnt - m);
            for (int i = 0; i < n; i++)
            {
                if (a[i] == b[i])
                {
                    if(cnt2<0)
                    {
                    for (int j = 'a'; j <= 'z'; j++)
                    {
                        if (a[i] != j && b[i] != j)
                        {
                            printf("%c", j);
                            cnt2++;
                            break;
                        }
                    }
                    }
                    else
                        printf("%c", c[i]);
                }
                else
                {
                    for (int j = 'a'; j <= 'z'; j++)
                    {
                        if (a[i] != j && b[i] != j)
                        {
                            printf("%c", j);
                            break;
                        }
                    }
                }
            }
        }
    }
    return 0;
}


#include <bits/stdc++.h>
using namespace std;
int main()
{
    int n, m;
    char a[100500], b[100500], c[100500];
    while (scanf("%d %d", &n, &m) != EOF)
    {
        memset(c, '0', sizeof(c));
        scanf("%s", a);
        scanf("%s", b);
        int cnt = 0;
        for (int i = 0; i < n; i++)
        {
            if (a[i] == b[i])
            {
                c[i] = a[i];
                cnt++;
            }
        }
        if (n - cnt >= m)
        {
            if ((n-cnt)/2>=m&&n-cnt-m>1)
                printf("-1\n");
            else
            {
                int cnt1 = n - cnt - m;
                int cnt2 = 0;
                for (int i = 0; i < n; i++)
                {
                    if (a[i] != b[i] && cnt2 < cnt1 * 2)
                    {
                        if (cnt2 < cnt1)
                        {
                            c[i] = a[i];
                            cnt2++;
                        }
                        else
                        {
                            c[i] = b[i];
                            cnt2++;
                        }
                    }
                    if (c[i] != '0')
                        printf("%c", c[i]);
                    else
                    {
                        for (int j = 'a'; j <= 'z'; j++)
                        {
                            if (a[i] != j && b[i] != j)
                            {
                                printf("%c", j);
                                break;
                            }
                        }
                    }
                }
                printf("\n");
            }
        }
        else
        {
            int cnt2 = (n - cnt - m);
            for (int i = 0; i < n; i++)
            {
                if (a[i] == b[i])
                {
                    if(cnt2<0)
                    {
                    for (int j = 'a'; j <= 'z'; j++)
                    {
                        if (a[i] != j && b[i] != j)
                        {
                            printf("%c", j);
                            cnt2++;
                            break;
                        }
                    }
                    }
                    else
                        printf("%c", c[i]);
                }
                else
                {
                    for (int j = 'a'; j <= 'z'; j++)
                    {
                        if (a[i] != j && b[i] != j)
                        {
                            printf("%c", j);
                            break;
                        }
                    }
                }
            }
        }
    }
    return 0;
}


#include<bits/stdc++.h>
using namespace std;
char find_char(char a,char b)
{
    for(char ch='a'; ch<='z'; ch++)
        if(ch!=a && ch!=b) return ch;
}
int main()
{
    int n,t;
    cin>>n>>t;
    string a,b;
    cin>>a>>b;
    vector<int> same,different;
    char ans[100007];
    memset(ans,'0',sizeof ans);
    for(int i=0; i<n; i++)
    {
        if(a[i]==b[i]) same.push_back(i);
        else different.push_back(i);
    }

    int x=same.size(),y=different.size();
    if(y>(2*t))
    {
        cout<<-1<<endl;
        return 0;
    }
    if((y+x)<t && y<t)
    {
        cout<<-1<<endl;
        return 0;
    }

    if(y<=t)
    {

        for(int i=0; i<y; i++)
        {
            int p=different[i];
            ans[p]=find_char(a[p],b[p]);
            t--;
        }

        for(int i=0; i<x && t>0; i++)
        {
            int p=same[i];
            ans[p]=find_char(a[p],b[p]);
            t--;
        }
    }
    else
    {
        int l=y-t;
        int r=t-l;
        for(int i=0;i<r; i++)
        {
            int p=different[i];
            ans[p]=find_char(a[p],b[p]);
            t--;
        }
        for(int i=r; i<different.size(); i++)
        {
            int p=different[i];
            if(i&1) ans[p]=a[p];
            else ans[p]=b[p];
        }
    }

    string out;
    for(int i=0; i<n; i++)
    {
        if(ans[i]=='0') out+=a[i];
        else out+=ans[i];
    }

    cout<<out<<endl;

    return 0;
}


#include<bits/stdc++.h>
using namespace std;
char find_char(char a,char b)
{
    for(char ch='a'; ch<='z'; ch++)
        if(ch!=a && ch!=b) return ch;
}
int main()
{
    int n,t;
    cin>>n>>t;
    string a,b;
    cin>>a>>b;
    vector<int> same,different;
    char ans[100007];
    memset(ans,'0',sizeof ans);
    for(int i=0; i<n; i++)
    {
        if(a[i]==b[i]) same.push_back(i);
        else different.push_back(i);
    }

    int x=same.size(),y=different.size();
    if(y>(2*t))
    {
        cout<<-1<<endl;
        return 0;
    }
//    if(y+x<t && y<t)
//    {
//        cout<<-1<<endl;
//        return 0;
//    }
    if(((((y+1)/2)+x)<t || (((y+1)/2)>t)) && y>t)
    {
        cout<<-1<<endl;
        return 0;
    }

    if(y<=t)
    {

        for(int i=0; i<y; i++)
        {
            int p=different[i];
            ans[p]=find_char(a[p],b[p]);
            t--;
        }

        for(int i=0; i<x && t>0; i++)
        {
            int p=same[i];
            ans[p]=find_char(a[p],b[p]);
            t--;
        }
    }
    else
    {
        int mod=y%2;
        y-=mod;
        for(int i=0; i<y; i++)
        {
            int p=different[i];
            if(i&1) ans[p]=a[p],t--;
            else ans[p]=b[p];
        }
        if(t>0 && mod)
        {
            int p=different[y+mod-1];
            ans[p]=find_char(a[p],b[p]);
            t--;
        }

        if(t>0)
        {
            for(int i=0; i<x && t>0; i++)
            {
                int p=same[i];
                ans[p]=find_char(a[p],b[p]);
                t--;
            }
        }

    }

    string out;
b
    for(int i=0;i<n;i++)
    {
        if(ans[i]=='0') out+=a[i];
        else out+=ans[i];
    }

    cout<<out<<endl;

    return 0;
}


#include<bits/stdc++.h>
using namespace std;
char find_char(char a,char b)
{
    for(char ch='a'; ch<='z'; ch++)
        if(ch!=a && ch!=b) return ch;
}
int main()
{
    int n,t;
    cin>>n>>t;
    string a,b;
    cin>>a>>b;
    vector<int> same,different;
    char ans[100007];
    memset(ans,'0',sizeof ans);
    for(int i=0; i<n; i++)
    {
        if(a[i]==b[i]) same.push_back(i);
        else different.push_back(i);
    }

    int x=same.size(),y=different.size();
    if(y>(2*t))
    {
        cout<<-1<<endl;
        return 0;
    }
    if(y+x<t && y<t)
    {
        cout<<-1<<endl;
        return 0;
    }
    int d=(y+1)/2;
    if((d+x)<t && (y>t && y<=2*t))
    {
        cout<<-1<<endl;
        return 0;
    }

    if(y<=t)
    {

        for(int i=0; i<y; i++)
        {
            int p=different[i];
            ans[p]=find_char(a[p],b[p]);
            t--;
        }

        for(int i=0; i<x && t>0; i++)
        {
            int p=same[i];
            ans[p]=find_char(a[p],b[p]);
            t--;
        }
    }
    else
    {
        int mod=y%2;
        y-=mod;
        for(int i=0; i<y; i++)
        {
            int p=different[i];
            if(i&1) ans[p]=a[p],t--;
            else ans[p]=b[p];
        }
        if(t>0 && mod)
        {
            int p=different[y+mod-1];
            ans[p]=find_char(a[p],b[p]);
            t--;
        }

        if(t>0)
        {
            for(int i=0; i<x && t>0; i++)
            {
                int p=same[i];
                ans[p]=find_char(a[p],b[p]);
                t--;
            }
        }

    }

    string out;
    for(int i=0;i<n;i++)
    {
        if(ans[i]=='0') out+=a[i];
        else out+=ans[i];
    }

    cout<<out<<endl;

    return 0;
}


#include<bits/stdc++.h>
using namespace std;
char find_char(char a,char b)
{
    for(char ch='a'; ch<='z'; ch++)
        if(ch!=a && ch!=b) return ch;
}
int main()
{
    int n,t;
    cin>>n>>t;
    string a,b;
    cin>>a>>b;
    vector<int> same,different;
    char ans[100007];
    memset(ans,'0',sizeof ans);
    for(int i=0; i<n; i++)
    {
        if(a[i]==b[i]) same.push_back(i);
        else different.push_back(i);
    }

    int x=same.size(),y=different.size();
////    if(y>(2*t))
////    {
////        cout<<-1<<endl;
////        return 0;
////    }
    if((y+x)<t && y<t)
    {
        cout<<-1<<endl;
        return 0;
    }
    int d=(y+1)/2;
    if((d+x)<t && (y>t && y<=2*t))
    {
        cout<<-1<<endl;
        return 0;
    }

    if(y<=t)
    {

        for(int i=0; i<y; i++)
        {
            int p=different[i];
            ans[p]=find_char(a[p],b[p]);
            t--;
        }

        for(int i=0; i<x && t>0; i++)
        {
            int p=same[i];
            ans[p]=find_char(a[p],b[p]);
            t--;
        }
    }
    else
    {
        int mod=y%2;
        y-=mod;
        for(int i=0; i<y; i++)
        {
            int p=different[i];
            if(i&1) ans[p]=a[p],t--;
            else ans[p]=b[p];
        }
        if(t>0 && mod)
        {
            int p=different[y+mod-1];
            ans[p]=find_char(a[p],b[p]);
            t--;
        }

        if(t>0)
        {
            for(int i=0; i<x && t>0; i++)
            {
                int p=same[i];
                ans[p]=find_char(a[p],b[p]);
                t--;
            }
        }

    }

    string out;
    for(int i=0;i<n;i++)
    {
        if(ans[i]=='0') out+=a[i];
        else out+=ans[i];
    }

    cout<<out<<endl;

    return 0;
}


#include<bits/stdc++.h>
using namespace std;
char find_char(char a,char b)
{
    for(char ch='a'; ch<='z'; ch++)
        if(ch!=a && ch!=b) return ch;
}
int main()
{
    int n,t;
    cin>>n>>t;
    string a,b;
    cin>>a>>b;
    vector<int> same,different;
    char ans[100007];
    memset(ans,'0',sizeof ans);
    for(int i=0; i<n; i++)
    {
        if(a[i]==b[i]) same.push_back(i);
        else different.push_back(i);
    }

    int x=same.size(),y=different.size();
    if(y>(2*t))
    {
        cout<<-1<<endl;
        return 0;
    }
    if(y+x<t && y<t)
    {
        cout<<-1<<endl;
        return 0;
    }
    int d=(y+1)/2;
    if((d+x)<t)
    {
        cout<<-1<<endl;
        return 0;
    }

    if(y<=t)
    {

        for(int i=0; i<y; i++)
        {
            int p=different[i];
            ans[p]=find_char(a[p],b[p]);
            t--;
        }

        for(int i=0; i<x && t>0; i++)
        {
            int p=same[i];
            ans[p]=find_char(a[p],b[p]);
            t--;
        }
    }
    else
    {
        int mod=y%2;
        y-=mod;
        for(int i=0; i<y; i++)
        {
            int p=different[i];
            if(i&1) ans[p]=a[p],t--;
            else ans[p]=b[p];
        }
        if(t>0 && mod)
        {
            int p=different[y+mod-1];
            ans[p]=find_char(a[p],b[p]);
            t--;
        }

        if(t>0)
        {
            for(int i=0; i<x && t>0; i++)
            {
                int p=same[i];
                ans[p]=find_char(a[p],b[p]);
                t--;
            }
        }

    }

    string out;
    for(int i=0;i<n;i++)
    {
        if(ans[i]=='0') out+=a[i];
        else out+=ans[i];
    }

    cout<<out<<endl;

    return 0;
}


#include<bits/stdc++.h>
using namespace std;
char find_char(char a,char b)
{
    for(char ch='a'; ch<='z'; ch++)
        if(ch!=a && ch!=b) return ch;
}
int main()
{
    int n,t;
    cin>>n>>t;
    string a,b;
    cin>>a>>b;
    vector<int> same,different;
    char ans[100007];
    memset(ans,'0',sizeof ans);
    for(int i=0; i<n; i++)
    {
        if(a[i]==b[i]) same.push_back(i);
        else different.push_back(i);
    }

    int x=same.size(),y=different.size();
    if(y>(2*t))
    {
        cout<<-1<<endl;
        return 0;
    }
//    if(y+x<t && y<t)
//    {
//        cout<<-1<<endl;
//        return 0;
//    }
    if(((((y+1)/2)+x)<t || (((y+1)/2)>t)) && y>t)
    {
        cout<<-1<<endl;
        return 0;
    }

    if(y<=t)
    {

        for(int i=0; i<y; i++)
        {
            int p=different[i];
            ans[p]=find_char(a[p],b[p]);
            t--;
        }

        for(int i=0; i<x && t>0; i++)
        {
            int p=same[i];
            ans[p]=find_char(a[p],b[p]);
            t--;
        }
    }
    else
    {
        int mod=y%2;
        y-=mod;
        for(int i=0; i<y; i++)
        {
            int p=different[i];
            if(i&1) ans[p]=a[p],t--;
            else ans[p]=b[p];
        }
        if(t>0 && mod)
        {
            int p=different[y+mod-1];
            ans[p]=find_char(a[p],b[p]);
            t--;
        }

        if(t>0)
        {
            for(int i=0; i<x && t>0; i++)
            {
                int p=same[i];
                ans[p]=find_char(a[p],b[p]);
                t--;
            }
        }

    }

    string out;
    for(int i=0;i<n;i++)
    {
        if(ans[i]=='0') out+=a[i];
        else out+=ans[i];
    }

    cout<<out<<endl;

    return 0;
}


#include<bits/stdc++.h>
using namespace std;
char find_char(char a,char b)
{
    for(char ch='a'; ch<='z'; ch++)
        if(ch!=a && ch!=b) return ch;
}
int main()
{
    int n,t;
    cin>>n>>t;
    string a,b;
    cin>>a>>b;
    vector<int> same,different;
    char ans[100007];
    memset(ans,'0',sizeof ans);
    for(int i=0; i<n; i++)
    {
        if(a[i]==b[i]) same.push_back(i);
        else different.push_back(i);
    }

    int x=same.size(),y=different.size();
    if(y>(2*t))
    {
        cout<<-1<<endl;
        return 0;
    }
//    if((y+x)<t && y<t)
//    {
//        cout<<-1<<endl;
//        return 0;
//    }
    int d=(y+1)/2;
    if((d+x)<t && (y>t && y<=2*t))
    {
        cout<<-1<<endl;
        return 0;
    }

    if(y<=t)
    {

        for(int i=0; i<y; i++)
        {
            int p=different[i];
            ans[p]=find_char(a[p],b[p]);
            t--;
        }

        for(int i=0; i<x && t>0; i++)
        {
            int p=same[i];
            ans[p]=find_char(a[p],b[p]);
            t--;
        }
    }
    else
    {
        int mod=y%2;
        y-=mod;
        for(int i=0; i<y; i++)
        {
            int p=different[i];
            if(i&1) ans[p]=a[p],t--;
            else ans[p]=b[p];
        }
        if(t>0 && mod)
        {
            int p=different[y+mod-1];
            ans[p]=find_char(a[p],b[p]);
            t--;
        }

        if(t>0)
        {
            for(int i=0; i<x && t>0; i++)
            {
                int p=same[i];
                ans[p]=find_char(a[p],b[p]);
                t--;
            }
        }

    }

    string out;
    for(int i=0;i<n;i++)
    {
        if(ans[i]=='0') out+=a[i];
        else out+=ans[i];
    }

    cout<<out<<endl;

    return 0;
}


#include<bits/stdc++.h>
using namespace std;
char find_char(char a,char b)
{
    for(char ch='a'; ch<='z'; ch++)
        if(ch!=a && ch!=b) return ch;
}
int main()
{
    int n,t;
    cin>>n>>t;
    string a,b;
    cin>>a>>b;
    vector<int> same,different;
    char ans[100007];
    memset(ans,'0',sizeof ans);
    for(int i=0; i<n; i++)
    {
        if(a[i]==b[i]) same.push_back(i);
        else different.push_back(i);
    }

    int x=same.size(),y=different.size();
    if(y>(2*t))
    {
        cout<<-1<<endl;
        return 0;
    }
    if((y+x)<t && y<t)
    {
        cout<<-1<<endl;
        return 0;
    }
    int d=0,l=0;
    if(y>t)
    {
        l=y-t;
        t-=(l);
        d=l+(t);
        if((d+x)<t)
        {
            cout<<-1<<endl;
            return 0;
        }
    }

    if(y<=t)
    {

        for(int i=0; i<y; i++)
        {
            int p=different[i];
            ans[p]=find_char(a[p],b[p]);
            t--;
        }

        for(int i=0; i<x && t>0; i++)
        {
            int p=same[i];
            ans[p]=find_char(a[p],b[p]);
            t--;
        }
    }
    else
    {
        for(int i=0;; i++)
        {
            int p=different[i];
            if(i&1) ans[p]=a[p],l--;
            else ans[p]=b[p];
            if(l==0) break;
        }

        for(int i=l; ; i++)
        {
            if(t==0) break;
            int p=different[i];
            ans[p]=find_char(a[p],b[p]);

            t--;
        }
        if(t>0)
        {
            for(int i=0; i<x && t>0; i++)
            {
                int p=same[i];
                ans[p]=find_char(a[p],b[p]);
                t--;
            }
        }

    }

    string out;
    for(int i=0; i<n; i++)
    {
        if(ans[i]=='0') out+=a[i];
        else out+=ans[i];
    }

    cout<<out<<endl;

    return 0;
}


#include<bits/stdc++.h>
using namespace std;
char find_char(char a,char b)
{
    for(char ch='a'; ch<='z'; ch++)
        if(ch!=a && ch!=b) return ch;
}
int main()
{
    int n,t;
    cin>>n>>t;
    string a,b;
    cin>>a>>b;
    vector<int> same,different;
    char ans[100007];
    memset(ans,'0',sizeof ans);
    for(int i=0; i<n; i++)
    {
        if(a[i]==b[i]) same.push_back(i);
        else different.push_back(i);
    }

    int x=same.size(),y=different.size();
    if(y>(2*t))
    {
        cout<<-1<<endl;
        return 0;
    }
    if(y+x<t && y<t)
    {
        cout<<-1<<endl;
        return 0;
    }
    if(((((y+1)/2)+x)<t || (((y+1)/2)>t)) && y>t)
    {
        cout<<-1<<endl;
        return 0;
    }

    if(y<=t)
    {
        for(int i=0; i<y; i++)
        {
            int p=different[i];
            ans[p]=find_char(a[p],b[p]);
            t--;
        }

        for(int i=0; i<x && t>0; i++)
        {
            int p=same[i];
            ans[p]=find_char(a[p],b[p]);
            t--;
        }
    }
    else
    {
        int mod=y%2;
        y-=mod;
        for(int i=0; i<y; i++)
        {
            int p=different[i];
            if(i&1) ans[p]=a[p];
            else ans[p]=b[p];
            t--;
        }
        if(t>0 && mod)
        {
            int p=different[y+mod-1];
            ans[p]=find_char(a[p],b[p]);
            t--;
        }

        if(t>0)
        {
            for(int i=0; i<x && t>0; i++)
            {
                int p=same[i];
                ans[p]=find_char(a[p],b[p]);
                t--;
            }
        }

    }

    string out;

    for(int i=0;i<n;i++)
    {
        if(ans[i]=='0') out+=a[i];
        else out+=ans[i];
    }

    cout<<out<<endl;

    return 0;
}


#include<bits/stdc++.h>
using namespace std;
char find_char(char a,char b)
{
    for(char ch='a'; ch<='z'; ch++)
        if(ch!=a && ch!=b) return ch;
}
int main()
{
    int n,t;
    cin>>n>>t;
    string a,b;
    cin>>a>>b;
    vector<int> same,different;
    char ans[100007];
    memset(ans,'0',sizeof ans);
    for(int i=0; i<n; i++)
    {
        if(a[i]==b[i]) same.push_back(i);
        else different.push_back(i);
    }

    int x=same.size(),y=different.size();
    if(y>(2*t))
    {
        cout<<-1<<endl;
        return 0;
    }
    if(y+x<t && y<t)
    {
        cout<<-1<<endl;
        return 0;
    }
    if(((((y+1)/2)+x)<t || (((y+1)/2)>t)) && y>t)
    {
        cout<<-1<<endl;
        return 0;
    }

    if(y<=t)
    {

        for(int i=0; i<y; i++)
        {
            int p=different[i];
            ans[p]=find_char(a[p],b[p]);
            t--;
        }

        for(int i=0; i<x && t>0; i++)
        {
            int p=same[i];
            ans[p]=find_char(a[p],b[p]);
            t--;
        }
    }
    else
    {
        int mod=y%2;
        y-=mod;
        for(int i=0; i<y; i++)
        {
            int p=different[i];
            if(i&1) ans[p]=a[p],t--;
            else ans[p]=b[p];
        }
        if(t>0 && mod)
        {
            int p=different[y+mod-1];
            ans[p]=find_char(a[p],b[p]);
            t--;
        }

        if(t>0)
        {
            for(int i=0; i<x && t>0; i++)
            {
                int p=same[i];
                ans[p]=find_char(a[p],b[p]);
                t--;
            }
        }

    }

    string out;

    for(int i=0;i<n;i++)
    {
        if(ans[i]=='0') out+=a[i];
        else out+=ans[i];
    }

    cout<<out<<endl;

    return 0;
}


#include <bits/stdc++.h>
using namespace std;
const int tmax=1e5+5;
int n,t,a,b,pa[tmax],pb[tmax];
char s1[tmax],s2[tmax],s[tmax];
int main()
{
	scanf("%d%d",&n,&t);
	scanf("%s",s1);
	scanf("%s",s2);
	int i;
	char tmp;
	for(i=0;i<n;i++)
	{
		if(s1[i]==s2[i])
		  pa[++a]=i;
		else pb[++b]=i;
	}
	if(b>t)
	{
		printf("-1");
		return 0;
	}
	for(i=1;i<=b;i++)
	{
		for(tmp='a';tmp<='z';tmp++)
		  if(tmp!=s1[pb[i]]&&tmp!=s2[pb[i]])
		    break;
		s[pb[i]]=tmp;
	}
	t-=b;
	for(i=1;i<=t;i++)
	{
		for(tmp='a';tmp<='z';tmp++)
		  if(tmp!=s1[pa[i]]) break;
		s[pa[i]]=tmp;
 	}
 	for(;i<=a;i++)
 		s[pa[i]]=s1[pa[i]];
 	s[n]='\0';
 	printf("%s",s);
	return 0;
}


#include <cstdio>
using namespace std;
char a[100001];
char b[100001];
bool d[100000];
char r[100001];
int main(int argc, char const *argv[]) {
	int n, t; scanf("%d %d", &n, &t);
	getchar();
	scanf("%s %s", a, b);
	int c = 0;
	for (int i = 0; i < n; ++i) {
		if (a[i] != b[i]) {
			d[i] = true;
			c++;
		}
	}
	int min = (c + 1) / 2;
	if (t < min) {
		printf("-1\n");
		return 0;
	} else {
		int da = n;
		int db = n;
		for (int i = 0; i < n; ++i) {
			int cc = 0;
			while (!(('a' + cc) != a[i] && ('a' + cc) != b[i])) {
				cc = (cc + 1) % 26;
			}
			r[i] = 'a' + cc;
		}
		int rool = 0;
		for (int i = 0; i < n; ++i) {
			if (d[i]) {
				if (rool) {
					if (da > t) {
						r[i] = a[i];
						da--;
						rool = !rool;
					}
				} else {
					if (db > t) {
						r[i] = b[i];
						db--;
						rool = !rool;
					}
				}
			}
		}
		if (da != db) {
			return -1;
		}
		for (int i = 0; i < n; ++i) {
			if (!d[i]) {
				if (da > t) {
					r[i] = a[i];
					da--;
				}
			}
		}
	}
	printf("%s\n", r);
	return 0;
}


// qdd on Apr 12, 2018

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

const int MAXN = 1e5 + 7;

char s1[MAXN], s2[MAXN], res[MAXN];

char getDiff(const char &c1, const char &c2)
{
    for (char i = 'a'; i <= 'z'; i++)
    {
        if ((i != c1) && (i != c2)) return i;
    }
}

int main()
{
    int n, t;
    int cntd = 0;
    cin >> n >> t;
    scanf("%s", s1);
    scanf("%s", s2);
    for (int i = 0; i < n; i++)
    {
        if (s1[i] != s2[i]) cntd++;
    }
    if (t < (cntd + 1) / 2) return puts("-1"), 0;
    int lim = cntd / 2;
    int cnt1 = 0, cnt2 = 0;
    for (int i = 0; i < n; i++)
    {
        if (s1[i] == s2[i]) continue;
        if (cnt1 < lim)
        {
            res[i] = s2[i];
            cnt1++;
        }
        else if (cnt2 < lim)
        {
            res[i] = s1[i];
            cnt2++;
        }
        else if (cnt1 < t)
        {
            res[i] = getDiff(s1[i], s2[i]);
            cnt1++;
            cnt2++;
        }
        else res[i] = s1[i];
    }
    for (int i = 0; i < n; i++)
    {
        if (s1[i] != s2[i]) continue;
        if (cnt1 < t)
        {
            res[i] = getDiff(s1[i], s2[i]);
            cnt1++;
            cnt2++;
        }
        else res[i] = s1[i];
    }
    printf("%s\n", res);
    return 0;
}


#include <bits/stdc++.h>
using namespace std;
#define ll long long
#define ld long double
#define fastio() ios_base::sync_with_stdio(0); cin.tie(0); cout.tie(0);
#define here(x) cout << #x << " = " << x << endl;
#define show(x) {for( auto i : x) cout << i << '\t'; cout << endl;}
#define shop(n, x) {for(int i = 0; i < n; i++) cout << x << setw(4); cout << endl;}
#define all(v) v.begin(), v.end()
#define ff first
#define ss second
#define endl '\n'
#define en " "
#define pb push_back
ll mod = 1000000007;
ll inf = LLONG_MAX;
long double pi = 3.1415926536;
void change(string s, string se, string &ans, ll idx)
{
	for(ll i = 0; i < 26; i++)
	{
		char ch = 'a' + i;
		if(ch != s[idx] && ch != se[idx])
		{
			ans[idx] = ch;
			break;
		}
	}
}
int main()
{
	fastio();
	int tt = 1;
	//cin >> tt;
	while(tt--)
	{
		// 		j NOT i 		check		//		CHECK -> if()   else if()
		ll n, x = 0, m = 0, y = 0, k = inf;
		string s, se, ans;
		cin >> n >> k;
		cin >> s >> se;
		vector < ll > v;
		for(ll i = 0; i < n; i++)
		{
			if(s[i] == se[i])
				ans += s[i];
			else
			{
				x++;
				v.pb(i);
				if(x % 2)
					ans += se[i];
				else
					ans += s[i];
			}
		}
		if(k < (x + 1) / 2)
		{
			cout << -1 << endl;
			break;
		}
		ll re = k;
		if(x % 2)
		{
			re--;
			change(s, se, ans, v.back());
		}
		for(ll i = 0; i < v.size() && x >= 2; i += 2)
		{
			if(re >= 1)
			{
				ans[v[i]] = s[v[i]];
				ans[v[i + 1]] = se[v[i + 1]];
				re--;
			}
		}
		for(ll i = 0; i < n && re >= 1; i++)
		{
			if(s[i] == se[i])
			{
				change(s, se, ans, i);
				re--;
			}
		}
		cout << ans << endl;
	}
}


#include <bits/stdc++.h>
using namespace std;
#define ll long long
#define ld long double
#define fastio() ios_base::sync_with_stdio(0); cin.tie(0); cout.tie(0);
#define here(x) cout << #x << " = " << x << endl;
#define show(x) {for( auto i : x) cout << i << '\t'; cout << endl;}
#define shop(n, x) {for(int i = 0; i < n; i++) cout << x << setw(4); cout << endl;}
#define all(v) v.begin(), v.end()
#define ff first
#define ss second
#define endl '\n'
#define en " "
#define pb push_back
ll mod = 1000000007;
ll inf = LLONG_MAX;
long double pi = 3.1415926536;
int main()
{
	fastio();
	int tt = 1;
	//cin >> tt;
	while(tt--)
	{
		// 		j NOT i 		check		//		CHECK -> if()   else if()
		ll n, x = 0, m = 0, y = 0, k = inf;
		string s, se, ans;
		cin >> n >> k;
		cin >> s >> se;
		ll re = 2 * k;
		for(ll i = 0; i < n; i++)
		{
			if(s[i] == se[i])
				ans += s[i];
			else
			{
				x++;
				for(ll j = 0; j < 26; j++)
				{
					char ch = 'a' + j;
					if(ch != s[i] && ch != se[i])
					{
						ans += ch;
						re -= 2;
						break;
					}
				}
			}
		}
		ll f = 1;
		if(k < (x + 1) / 2)		f = 0;

		for(ll i = 0; i < n && re > 0; i++)
		{
			if(s[i] == se[i])
			{
				re--;
				for(ll j = 0; j < 26; j++)
				{
					char ch = 'a' + j;
					if(ch != s[i] && ch != se[i])
					{
						ans[i] = ch;
						break;
					}
				}
			}
		}
		if(f)
			cout << ans << endl;
		else
			cout << -1 << endl;
	}
}


#include <bits/stdc++.h>
using namespace std;
#define ll long long
#define ld long double
#define fastio() ios_base::sync_with_stdio(0); cin.tie(0); cout.tie(0);
#define here(x) cout << #x << " = " << x << endl;
#define show(x) {for( auto i : x) cout << i << '\t'; cout << endl;}
#define shop(n, x) {for(int i = 0; i < n; i++) cout << x << setw(4); cout << endl;}
#define all(v) v.begin(), v.end()
#define ff first
#define ss second
#define endl '\n'
#define en " "
#define pb push_back
ll mod = 1000000007;
ll inf = LLONG_MAX;
long double pi = 3.1415926536;
void change(string s, string se, string &ans, ll idx)
{
	for(ll i = 0; i < 26; i++)
	{
		char ch = 'a' + i;
		if(ch != s[idx] && ch != se[idx])
		{
			ans[idx] = ch;
			break;
		}
	}
}
int main()
{
	fastio();
	int tt = 1;
	//cin >> tt;
	while(tt--)
	{
		// 		j NOT i 		check		//		CHECK -> if()   else if()
		ll n, x = 0, m = 0, y = 0, k = inf;
		string s, se, ans;
		cin >> n >> k;
		cin >> s >> se;
		vector < ll > v;
		for(ll i = 0; i < n; i++)
		{
			if(s[i] == se[i])
				ans += s[i];
			else
			{
				x++;
				v.pb(i);
				if(x % 2)
					ans += se[i];
				else
					ans += s[i];
			}
		}
		if(k < (x + 1) / 2)
		{
			cout << -1 << endl;
			break;
		}
		ll re = k;
		if(x % 2)
		{
			re--;
			change(s, se, ans, v.back());
		}
		for(ll i = 0; i < v.size(); i += 2)
		{
			if(re >= 1)
			{
				ans[v[i]] = s[v[i]];
				ans[v[i + 1]] = se[v[i + 1]];
				re--;
			}
		}
		for(ll i = 0; i < n && re >= 1; i++)
		{
			if(s[i] == se[i])
			{
				change(s, se, ans, i);
				re--;
			}
		}
		cout << ans << endl;
	}
}


#include <bits/stdc++.h>
using namespace std;
#define ll long long
#define ld long double
#define fastio() ios_base::sync_with_stdio(0); cin.tie(0); cout.tie(0);
#define here(x) cout << #x << " = " << x << endl;
#define show(x) {for( auto i : x) cout << i << '\t'; cout << endl;}
#define shop(n, x) {for(int i = 0; i < n; i++) cout << x << setw(4); cout << endl;}
#define all(v) v.begin(), v.end()
#define ff first
#define ss second
#define endl '\n'
#define en " "
#define pb push_back
ll mod = 1000000007;
ll inf = LLONG_MAX;
long double pi = 3.1415926536;
int main()
{
	fastio();
	int tt = 1;
	//cin >> tt;
	while(tt--)
	{
		// 		j NOT i 		check		//		CHECK -> if()   else if()
		ll n, x = 0, m = 0, y = 0, k = inf;
		string s, se, ans;
		cin >> n >> k;
		cin >> s >> se;
		for(ll i = 0; i < n; i++)
		{
			if(s[i] == se[i])
				ans += s[i];
			else
			{
				x++;
				if(x % 2)
					ans += se[i];
				else
					ans += s[i];
			}
		}
		ll f = 1;
		y = n - x;
		if(x % 2)
			f = 0;
		if(y < k - x / 2)
			f = 0;
		ll re = k - x / 2;
		for(ll i = 0; i < n && re > 0; i++)
		{
			if(s[i] == se[i])
			{
				re--;
				for(ll j = 0; j < 26; j++)
				{
					char ch = 'a' + j;
					if(ch != s[i] && ch != se[i])
					{
						ans[i] = ch;
						break;
					}
				}
			}
		}
		if(f)
			cout << ans << endl;
		else
			cout << -1 << endl;
	}
}


#include <bits/stdc++.h>
using namespace std;
#define ll long long
#define ld long double
#define fastio() ios_base::sync_with_stdio(0); cin.tie(0); cout.tie(0);
#define here(x) cout << #x << " = " << x << endl;
#define show(x) {for( auto i : x) cout << i << '\t'; cout << endl;}
#define shop(n, x) {for(int i = 0; i < n; i++) cout << x << setw(4); cout << endl;}
#define all(v) v.begin(), v.end()
#define ff first
#define ss second
#define endl '\n'
#define en " "
#define pb push_back
ll mod = 1000000007;
ll inf = LLONG_MAX;
long double pi = 3.1415926536;
int main()
{
	fastio();
	int tt = 1;
	//cin >> tt;
	while(tt--)
	{
		// 		j NOT i 		check		//		CHECK -> if()   else if()
		ll n, x = 0, m = 0, y = 0, k = inf;
		string s, se, ans;
		cin >> n >> k;
		cin >> s >> se;
		ll re = 2 * k;
		for(ll i = 0; i < n; i++)
		{
			if(s[i] == se[i])
				ans += s[i];
			else
			{
				x++;
				for(ll j = 0; j < 26; j++)
				{
					char ch = 'a' + j;
					if(ch != s[i] && ch != se[i])
					{
						ans += ch;
						re -= 2;
						break;
					}
				}
			}
		}
		ll f = 1;
		if(k < (x + 1) / 2)		f = 0;

		for(ll i = 0; i < n && re > 0; i++)
		{
			if(s[i] == se[i])
			{
				re -= 2;
				for(ll j = 0; j < 26; j++)
				{
					char ch = 'a' + j;
					if(ch != s[i] && ch != se[i])
					{
						ans[i] = ch;
						break;
					}
				}
			}
		}
		if(f)
			cout << ans << endl;
		else
			cout << -1 << endl;
	}
}


#include <bits/stdc++.h>
using namespace std;
#define ll long long
#define ld long double
#define fastio() ios_base::sync_with_stdio(0); cin.tie(0); cout.tie(0);
#define here(x) cout << #x << " = " << x << endl;
#define show(x) {for( auto i : x) cout << i << '\t'; cout << endl;}
#define shop(n, x) {for(int i = 0; i < n; i++) cout << x << setw(4); cout << endl;}
#define all(v) v.begin(), v.end()
#define ff first
#define ss second
#define endl '\n'
#define en " "
#define pb push_back
ll mod = 1000000007;
ll inf = LLONG_MAX;
long double pi = 3.1415926536;
void change(string s, string se, string &ans, ll idx)
{
	for(ll i = 0; i < 26; i++)
	{
		char ch = 'a' + i;
		if(ch != s[idx] && ch != se[idx])
		{
			ans[idx] = ch;
			break;
		}
	}
}
int main()
{
	fastio();
	int tt = 1;
	//cin >> tt;
	while(tt--)
	{
		// 		j NOT i 		check		//		CHECK -> if()   else if()
		ll n, x = 0, m = 0, y = 0, k = inf;
		cin >> n >> k;
		string s, se, ans;
		cin >> s >> se;
		vector < ll > v;
		for(ll i = 0; i < n; i++)
		{
			if(s[i] != se[i])
			{
				x++;
				v.pb(i);
				if(x % 2) ans += s[i];
				else ans += se[i];
			}
			else ans += s[i];
		}
		if(k < (x + 1) / 2)
		{
			cout << -1 << endl;
			return 0;
		}
		ll p = 2 * (x - k);
		if(x >= k)
		{
			for(ll i = 0; i < v.size() - p; i++)
				change(s, se, ans, v[i]);
			cout << ans << endl;
		}
		else
		{
			for(ll i = 0; i < v.size(); i++)
				change(s, se, ans, v[i]);
			p = k - x;
			for(ll i = 0; i < n && p > 0; i++)
			{
				if(s[i] == se[i])
				{
					change(s, se, ans, i);
					p--;
				}
			}
			cout << ans << endl;
		}
	}
}


#include<bits/stdc++.h>

using namespace std;

#define IOS ios::sync_with_stdio(0); cin.tie(0), cout.tie(0)

#define ll long long int
#define ld long double

#define fr first
#define se second

#define all(v) v.begin(),v.end()
#define rall(v) v.rbegin(),v.rend()
#define sz(v) (int)v.size()
#define sunq(v) sort(all(v));v.resize(distance(v.begin(),unique(all(v))))

#define pb push_back
#define mp make_pair

#define debug(...) fprintf(stderr, __VA_ARGS__), fflush(stderr)
#define emla(a, val) memset(a, val, sizeof(a))
#define easm(a, b) (a + b - 1)/b

#define PI 3.141592653589793238
#define E  2.718281828459045235

ll gcd(ll a,ll b) {return b?gcd(b,a%b):a;}
ll lcm(ll a,ll b) {return a*b/gcd(a,b);}

int n, t;
string s, ss;
const int N = 1e5 + 10;
char x[N];
int main() {
  IOS;
  //freopen("input.txt", "r", stdin);
  //freopen("output.txt", "w", stdout);
  //clock_t z = clock();
  cin >> n >> t;
  cin >> s >> ss;
  int ne = n - t;
  for(int i = 0; i < n && ne; i++){
    if(s[i] == ss[i])
      x[i] = s[i], ne--;
  }
  if(ne)return cout << -1 << endl, 0;
  set<int>v;
  for(char i = 'a'; i <= 'z'; i++)
    v.insert(i);
  for(int i = 0; i < n && t; i++){
    if(s[i] == ss[i]){
      v.erase(s[i]);
      x[i] = *(v.begin());
      v.insert(s[i]);
      t--;
    }else{
      t--;
      v.erase(s[i]);
      v.erase(ss[i]);
      x[i] = *(v.begin());
      v.insert(s[i]);
      v.insert(ss[i]);
    }
  }
  if(t)return cout << -1 << endl, 0;
  cout << x << endl;
  //debug("Total Time: %.3f\n", (double)(clock() - z) / CLOCKS_PER_SEC);
  /*
  *try tricky test cases:
    -bounds
    -integer overflow
    -small input (0, 1)
    -big input
    -random tests
  */
  return 0;
}


#include<bits/stdc++.h>

using namespace std;

#define IOS ios::sync_with_stdio(0); cin.tie(0), cout.tie(0)

#define ll long long int
#define ld long double

#define fr first
#define se second

#define all(v) v.begin(),v.end()
#define rall(v) v.rbegin(),v.rend()
#define sz(v) (int)v.size()
#define sunq(v) sort(all(v));v.resize(distance(v.begin(),unique(all(v))))

#define pb push_back
#define mp make_pair

#define debug(...) fprintf(stderr, __VA_ARGS__), fflush(stderr)
#define emla(a, val) memset(a, val, sizeof(a))
#define easm(a, b) (a + b - 1)/b

#define PI 3.141592653589793238
#define E  2.718281828459045235

ll gcd(ll a,ll b) {return b?gcd(b,a%b):a;}
ll lcm(ll a,ll b) {return a*b/gcd(a,b);}

int n, k;

string s, t;
set<int>st;
char a[101010];

int main() {
  IOS;
  //freopen("fractions.in", "r", stdin);
  //freopen("output.txt", "w", stdout);
  //clock_t z = clock();
  cin >> n >> k >> s >> t;
  for(char i = 'a'; i <= 'z'; i++)st.insert(i);
  emla(a, '1');
  a[n] = '\0';
  int ne = n - k;
  for(int i = 0; i < n; i++)
    if(s[i] == t[i]){
      if(ne == 0)break;
      a[i] = s[i];
      ne--;
    }

  if(ne*2 > n)return cout << -1 << endl, 0;
  int ns = ne, nt = ne;
  for(int i = 0; i < n; i++)
    if(!isalpha(a[i]) && s[i] != t[i]){
      if(!ns)break;
      a[i] = s[i];
      ns--;
    }

  for(int i = 0; i < n; i++){
    if(!isalpha(a[i]) && s[i] != t[i]){
      if(!nt)
        break;
      a[i] = t[i];
      nt--;
    }
  }
  for(int i = 0; i < n; i++){
    if(isalpha(a[i]))continue;
    st.erase(s[i]);
    st.erase(t[i]);
    a[i] = *(st.begin());
    st.insert(s[i]);
    st.insert(t[i]);
  }

  cout << a << endl;
  //debug("Total Time: %.3f\n", (double)(clock() - z) / CLOCKS_PER_SEC);
  /*
  *try tricky test cases:
    -bounds
    -integer overflow
    -small input (0, 1)
    -big input
    -random tests
  */
  return 0;
}


#include<bits/stdc++.h>

using namespace std;

#define IOS ios::sync_with_stdio(0); cin.tie(0), cout.tie(0)

#define ll long long int
#define ld long double

#define fr first
#define se second

#define all(v) v.begin(),v.end()
#define rall(v) v.rbegin(),v.rend()
#define sz(v) (int)v.size()
#define sunq(v) sort(all(v));v.resize(distance(v.begin(),unique(all(v))))

#define pb push_back
#define mp make_pair

#define debug(...) fprintf(stderr, __VA_ARGS__), fflush(stderr)
#define emla(a, val) memset(a, val, sizeof(a))
#define easm(a, b) (a + b - 1)/b

#define PI 3.141592653589793238
#define E  2.718281828459045235

ll gcd(ll a,ll b) {return b?gcd(b,a%b):a;}
ll lcm(ll a,ll b) {return a*b/gcd(a,b);}

int n, t;
string s, ss;
const int N = 1e5 + 10;
char x[N];
int main() {
  IOS;
  //freopen("input.txt", "r", stdin);
  //freopen("output.txt", "w", stdout);
  //clock_t z = clock();
  cin >> n >> t;
  cin >> s >> ss;
  int ne = n - t;
  for(int i = 0; i < n && ne; i++){
    if(s[i] == ss[i])
      x[i] = s[i], ne--;
  }
  if(ne)return cout << -1 << endl, 0;
  set<int>v;
  for(char i = 'a'; i <= 'z'; i++)
    v.insert(i);
  int i;
  for(i = 0; i < n; i++){
    if(s[i] != ss[i]){
      t--;
      v.erase(s[i]);
      v.erase(ss[i]);
      x[i] = *(v.begin());
      v.insert(s[i]);
      v.insert(ss[i]);
    }
  }
  if(t){
    for(i = 0; i < n && t; i++){
      if(s[i] == ss[i]){
        t--;
        v.erase(s[i]);
        x[i] = *(v.begin());
        v.insert(s[i]);
      }
    }
  }
  if(t < 0)return cout << -1 << endl, 0;
  for(i; i < n; i++){
    if(s[i] == ss[i])
      x[i] = s[i];
  }
  cout << x << endl;
  //debug("Total Time: %.3f\n", (double)(clock() - z) / CLOCKS_PER_SEC);
  /*
  *try tricky test cases:
    -bounds
    -integer overflow
    -small input (0, 1)
    -big input
    -random tests
  */
  return 0;
}


#include<bits/stdc++.h>

using namespace std;

#define IOS ios::sync_with_stdio(0); cin.tie(0), cout.tie(0)

#define ll long long int
#define ld long double

#define fr first
#define se second

#define all(v) v.begin(),v.end()
#define rall(v) v.rbegin(),v.rend()
#define sz(v) (int)v.size()
#define sunq(v) sort(all(v));v.resize(distance(v.begin(),unique(all(v))))

#define pb push_back
#define mp make_pair

#define debug(...) fprintf(stderr, __VA_ARGS__), fflush(stderr)
#define emla(a, val) memset(a, val, sizeof(a))
#define easm(a, b) (a + b - 1)/b

#define PI 3.141592653589793238
#define E  2.718281828459045235

ll gcd(ll a,ll b) {return b?gcd(b,a%b):a;}
ll lcm(ll a,ll b) {return a*b/gcd(a,b);}

int n, k;

string s, t;
set<int>st;
char a[101010];

int main() {
  IOS;
  //freopen("fractions.in", "r", stdin);
  //freopen("output.txt", "w", stdout);
  //clock_t z = clock();
  cin >> n >> k >> s >> t;
  if(k > n)
    return cout << -1 << endl, 0;
  for(char i = 'a'; i <= 'z'; i++)st.insert(i);
  emla(a, '1');
  a[n] = '\0';
  int ne = n - k;
  for(int i = 0; i < n; i++)
    if(s[i] == t[i]){
      if(ne == 0)break;
      a[i] = s[i];
      ne--;
    }

  if(ne*2 > n - ne)return cout << -1 << endl, 0;
  int ns = ne, nt = ne;
  for(int i = 0; i < n; i++)
    if(!isalpha(a[i]) && s[i] != t[i]){
      if(!ns)break;
      a[i] = s[i];
      ns--;
    }

  for(int i = 0; i < n; i++){
    if(!isalpha(a[i]) && s[i] != t[i]){
      if(!nt)
        break;
      a[i] = t[i];
      nt--;
    }
  }
  for(int i = 0; i < n; i++){
    if(isalpha(a[i]))continue;
    st.erase(s[i]);
    st.erase(t[i]);
    a[i] = *(st.begin());
    st.insert(s[i]);
    st.insert(t[i]);
  }

  cout << a << endl;
  //debug("Total Time: %.3f\n", (double)(clock() - z) / CLOCKS_PER_SEC);
  /*
  *try tricky test cases:
    -bounds
    -integer overflow
    -small input (0, 1)
    -big input
    -random tests
  */
  return 0;
}


#include<bits/stdc++.h>

using namespace std;

#define IOS ios::sync_with_stdio(0); cin.tie(0), cout.tie(0)

#define ll long long int
#define ld long double

#define fr first
#define se second

#define all(v) v.begin(),v.end()
#define rall(v) v.rbegin(),v.rend()
#define sz(v) (int)v.size()
#define sunq(v) sort(all(v));v.resize(distance(v.begin(),unique(all(v))))

#define pb push_back
#define mp make_pair

#define debug(...) fprintf(stderr, __VA_ARGS__), fflush(stderr)
#define emla(a, val) memset(a, val, sizeof(a))
#define easm(a, b) (a + b - 1)/b

#define PI 3.141592653589793238
#define E  2.718281828459045235

ll gcd(ll a,ll b) {return b?gcd(b,a%b):a;}
ll lcm(ll a,ll b) {return a*b/gcd(a,b);}

int n, k;

string s, t;
set<int>st;
char a[101010];

int main() {
  IOS;
  //freopen("fractions.in", "r", stdin);
  //freopen("output.txt", "w", stdout);
  //clock_t z = clock();
  cin >> n >> k >> s >> t;
  if(k > n)
    return cout << -1 << endl, 0;
  for(char i = 'a'; i <= 'z'; i++)st.insert(i);
  emla(a, '1');
  a[n] = '\0';
  int ne = n - k;
  for(int i = 0; i < n; i++)
    if(s[i] == t[i]){
      if(ne == 0)break;
      a[i] = s[i];
      ne--;
    }

  if(ne*2 > n)return cout << -1 << endl, 0;
  int ns = ne, nt = ne;
  for(int i = 0; i < n; i++)
    if(!isalpha(a[i]) && s[i] != t[i]){
      if(!ns)break;
      a[i] = s[i];
      ns--;
    }

  for(int i = 0; i < n; i++){
    if(!isalpha(a[i]) && s[i] != t[i]){
      if(!nt)
        break;
      a[i] = t[i];
      nt--;
    }
  }
  for(int i = 0; i < n; i++){
    if(isalpha(a[i]))continue;
    st.erase(s[i]);
    st.erase(t[i]);
    a[i] = *(st.begin());
    st.insert(s[i]);
    st.insert(t[i]);
  }

  cout << a << endl;
  //debug("Total Time: %.3f\n", (double)(clock() - z) / CLOCKS_PER_SEC);
  /*
  *try tricky test cases:
    -bounds
    -integer overflow
    -small input (0, 1)
    -big input
    -random tests
  */
  return 0;
}


#include<bits/stdc++.h>

using namespace std;

#define IOS ios::sync_with_stdio(0); cin.tie(0), cout.tie(0)

#define ll long long int
#define ld long double

#define fr first
#define se second

#define all(v) v.begin(),v.end()
#define rall(v) v.rbegin(),v.rend()
#define sz(v) (int)v.size()
#define sunq(v) sort(all(v));v.resize(distance(v.begin(),unique(all(v))))

#define pb push_back
#define mp make_pair

#define debug(...) fprintf(stderr, __VA_ARGS__), fflush(stderr)
#define emla(a, val) memset(a, val, sizeof(a))
#define easm(a, b) (a + b - 1)/b

#define PI 3.141592653589793238
#define E  2.718281828459045235

ll gcd(ll a,ll b) {return b?gcd(b,a%b):a;}
ll lcm(ll a,ll b) {return a*b/gcd(a,b);}

int n, t, a[26], b[26];
string s, ss, x;

int main() {
  IOS;
  //freopen("input.txt", "r", stdin);
  //freopen("output.txt", "w", stdout);
  //clock_t z = clock();
  cin >> n >> t;
  cin >> s >> ss;
  for(auto i : s)a[i-'a']++;
  for(auto i : ss)b[i-'a']++;
  int ne = n-t, g = -1;
  for(int i = 0; i < 26; i++)
    if(a[i] == ne && b[i] == ne)
      g = i;
  if(g == -1)
    return cout << g << endl, 0;
  for(int i = 0; i < ne; i++)
    x += (char)(g + 'a');
  g = -1;
  for(int i = 0; i < 26; i++)
    if(!a[i] && !b[i]){
      g = i;
      break;
    }
  if(g != -1){
    for(int i = 0; i < t; i++)
      x += (g + 'a');
    cout << x << endl;
    return 0;
  }
  for(int i = 0; i < 26; i++)
    if(b[i] <= ne && a[i] <= ne){
      g = i;
      break;
    }
  if(g != -1){
    for(int i = 0; i < t; i++)
      x += (g + 'a');
    cout << x << endl;
    return 0;
  }
  cout << g << endl;
  //debug("Total Time: %.3f\n", (double)(clock() - z) / CLOCKS_PER_SEC);
  /*
  *try tricky test cases:
    -bounds
    -integer overflow
    -small input (0, 1)
    -big input
    -random tests
  */
  return 0;
}


#include<bits/stdc++.h>

using namespace std;

#define IOS ios::sync_with_stdio(0); cin.tie(0), cout.tie(0)

#define ll long long int
#define ld long double

#define fr first
#define se second

#define all(v) v.begin(),v.end()
#define rall(v) v.rbegin(),v.rend()
#define sz(v) (int)v.size()
#define sunq(v) sort(all(v));v.resize(distance(v.begin(),unique(all(v))))

#define pb push_back
#define mp make_pair

#define debug(...) fprintf(stderr, __VA_ARGS__), fflush(stderr)
#define emla(a, val) memset(a, val, sizeof(a))
#define easm(a, b) (a + b - 1)/b

#define PI 3.141592653589793238
#define E  2.718281828459045235

ll gcd(ll a,ll b) {return b?gcd(b,a%b):a;}
ll lcm(ll a,ll b) {return a*b/gcd(a,b);}

int n, k;

string s, t;
set<int>st;
char a[101010];

int main() {
  IOS;
  //freopen("fractions.in", "r", stdin);
  //freopen("output.txt", "w", stdout);
  //clock_t z = clock();
  cin >> n >> k >> s >> t;
  if(k > n)
    return cout << -1 << endl, 0;
  for(char i = 'a'; i <= 'z'; i++)st.insert(i);
  emla(a, '1');
  a[n] = '\0';
  int ne = n - k, b = n;
  for(int i = 0; i < n; i++)
    if(s[i] == t[i]){
      if(ne == 0)break;
      a[i] = s[i];
      ne--;
      b--;
    }

  if(ne*2 > b)return cout << -1 << endl, 0;
  int ns = ne, nt = ne;
  for(int i = 0; i < n; i++)
    if(!isalpha(a[i]) && s[i] != t[i]){
      if(!ns)break;
      a[i] = s[i];
      ns--;
    }

  for(int i = 0; i < n; i++){
    if(!isalpha(a[i]) && s[i] != t[i]){
      if(!nt)
        break;
      a[i] = t[i];
      nt--;
    }
  }
  for(int i = 0; i < n; i++){
    if(isalpha(a[i]))continue;
    st.erase(s[i]);
    st.erase(t[i]);
    a[i] = *(st.begin());
    st.insert(s[i]);
    st.insert(t[i]);
  }

  cout << a << endl;
  //debug("Total Time: %.3f\n", (double)(clock() - z) / CLOCKS_PER_SEC);
  /*
  *try tricky test cases:
    -bounds
    -integer overflow
    -small input (0, 1)
    -big input
    -random tests
  */
  return 0;
}


#include <iostream>
#include <vector>
#include <algorithm>
#include <string>
#include <map>
#include <set>
#include <cmath>
#include <cstring>
using namespace std;
#define sqr(z) (z) * (z)
#define ch_NO(x) cout << "NO\n"; x = 1 - x;
#define b_NO cout << "NO\n"; break;
#define r_NO cout << "NO\n"; return 0;
#define c_NO cout << "NO\n"; continue;
#define ch_YES(x) cout << "YES\n"; x = 1 - x;
#define b_YES cout << "YES\n"; break;
#define r_YES cout << "YES\n"; return 0;
#define c_YES cout << "YES\n"; continue;
#define sz size()
#define pb push_back
#define int_ "%d",
#define fi first
#define se second
#define mm(k) memset((k), -1, sizeof(k));
#define all(k) (k).begin(), (k).end()
#define forn(i, n) for (int (i) = 0; (i) != (n); i++)
#define nfor(i, n) for (int (i) = (n) - 1; (i) != -1; i--)
#define do_nothing cout << " Work_Error ";
typedef vector<int> vi;
typedef pair<int, int> pii;
typedef long long ll;
typedef long double ld;
struct trio{
    int first;
    int second;
    int third;
};
struct long_trio{
    ll first;
    ll second;
    ll third;
};
double inq(double k, int q)
{
    if (q == 0)
        return 1;
    double l = inq(k, q / 2);
    if (q % 2 == 0)
        return l * l;
    else
        return l * l * k;
}
ll gcd(ll a, ll b)
{
    if (a < b)
        swap(a, b);
    if (b == 0)
        return a;
    return gcd(b, a % b);
}
ll cubr(ll a)
{
    ll l = -1, r = 1e6 + 2;
    while (l < r - 1)
    {
        ll mid = (l + r) / 2;
        if (mid * mid * mid > a)
            r = mid;
        else
            l = mid;
    }
    return l;
}
const ll INF = 1e18 + 2;
const int LIT = 505;
const int BIG = 200001;
string months[12] = {"January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"};
int days[12] = {31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31};
ll fact[13] = {1, 1, 2, 6, 24, 120, 720, 5040, 40320, 362280, 3622800, 39916800, 479001600};
int cx[6] = {1, -1, 0, 0, 0, 0};
int cy[6] = {0, 0, 1, -1, 0, 0};
int cz[6] = {0, 0, 0, 0, 1, -1};
//___________BAZE_________________
ll n, m, ans1, ans2;
ll arr[500100];
ll bs[500100];
string s1, s2, s3;

int main()
{
    cin >> n >> m >> s1 >> s2;
    int differ1 = 0, differ2 = 0;
    for (int i = 0; i < n; i++)
    {
        s3 = s3 + '#';
    }
    for (int i = 0; i < n; i++)
    {
        if (s1[i] != s2[i])
        {
            if (differ1 < differ2)
            {
                s3[i] = s2[i];
                differ1++;
            }
            else
            {
                s3[i] = s1[i];
                differ2++;
            }
        }
    }
    if (differ1 > m || differ2 > m || differ1 != differ2)
    {
        cout << -1;
        return 0;
    }
    for (int i = 0; i < n; i++)
    {
        if (s1[i] == s2[i])
        {
            if (differ1 > m)
            {
                s3[i] = s1[i];
            }
            else
            {
                if (s1[i] != 'a')
                    s3[i] = 'a';
                else
                    s3[i] = 'b';
            }
        }
    }
    cout << s3;
}


#include <iostream>
#include <vector>
#include <algorithm>
#include <string>
#include <map>
#include <set>
#include <cmath>
#include <cstring>
using namespace std;
#define sqr(z) (z) * (z)
#define ch_NO(x) cout << "NO\n"; x = 1 - x;
#define b_NO cout << "NO\n"; break;
#define r_NO cout << "NO\n"; return 0;
#define c_NO cout << "NO\n"; continue;
#define ch_YES(x) cout << "YES\n"; x = 1 - x;
#define b_YES cout << "YES\n"; break;
#define r_YES cout << "YES\n"; return 0;
#define c_YES cout << "YES\n"; continue;
#define sz size()
#define pb push_back
#define int_ "%d",
#define fi first
#define se second
#define mm(k) memset((k), -1, sizeof(k));
#define all(k) (k).begin(), (k).end()
#define forn(i, n) for (int (i) = 0; (i) != (n); i++)
#define nfor(i, n) for (int (i) = (n) - 1; (i) != -1; i--)
#define do_nothing cout << " Work_Error ";
typedef vector<int> vi;
typedef pair<int, int> pii;
typedef long long ll;
typedef long double ld;
struct trio{
    int first;
    int second;
    int third;
};
struct long_trio{
    ll first;
    ll second;
    ll third;
};
double inq(double k, int q)
{
    if (q == 0)
        return 1;
    double l = inq(k, q / 2);
    if (q % 2 == 0)
        return l * l;
    else
        return l * l * k;
}
ll gcd(ll a, ll b)
{
    if (a < b)
        swap(a, b);
    if (b == 0)
        return a;
    return gcd(b, a % b);
}
ll cubr(ll a)
{
    ll l = -1, r = 1e6 + 2;
    while (l < r - 1)
    {
        ll mid = (l + r) / 2;
        if (mid * mid * mid > a)
            r = mid;
        else
            l = mid;
    }
    return l;
}
const ll INF = 1e18 + 2;
const int LIT = 505;
const int BIG = 200001;
string months[12] = {"January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"};
int days[12] = {31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31};
ll fact[13] = {1, 1, 2, 6, 24, 120, 720, 5040, 40320, 362280, 3622800, 39916800, 479001600};
int cx[6] = {1, -1, 0, 0, 0, 0};
int cy[6] = {0, 0, 1, -1, 0, 0};
int cz[6] = {0, 0, 0, 0, 1, -1};
//___________BAZE_________________
ll n, m, ans1, ans2;
ll arr[500100];
ll bs[500100];
string s1, s2, s3;

int main()
{
    cin >> n >> m >> s1 >> s2;
    int m1 = m, m2 = m;
    int differ = 0;
    int ksi = -1;
    for (int i = 0; i < n; i++)
    {
        s3 = s3 + "#";
    }
    for (int i = 0; i < n; i++)
    {
        if (s1[i] != s2[i])
        {
            differ++;
            ksi = i;
        }
    }
    if (differ % 2 == 1)
    {
        s3[ksi] = 'a';
        if (s1[ksi] == 'a' || s2[ksi] == 'a')
        {
            s3[ksi] = 'b';
            if (s1[ksi] == 'b' || s2[ksi] == 'b')
            {
                s3[ksi] = 'c';
            }
        }
        m2--;
        m1--;
        differ--;
    }
    else
    {
        ksi = -1;
    }
    if (differ > m1 + m2)
    {
        cout << -1;
        return 0;
    }
    //cout << ksi << endl;
    int ps = differ;
    int cel = m1 - ps;
    for (int i = 0; i < n; i++)
    {
        if (i != ksi && s1[i] != s2[i])
        {
            if (cel > 0)
            {
                s3[i] = 'a';
                while (s1[i] == s3[i] || s2[i] == s3[i])
                {
                    s3[i]++;
                }
                cel--;
                m1--;
                m2--;
            }
            else
            if (m1 > m2)
            {
                s3[i] = s2[i];
                m1--;
            }
            else
            {
                s3[i] = s1[i];
                m2--;
            }
        }
    }
    for (int i = 0; i < n; i++)
    {
        if (s1[i] == s2[i])
        {
            if (m1 > 0)
            {
                s3[i] = 'a';
                if (s1[i] == 'a')
                    s3[i] = 'b';
                m1--;
            }
            else
            {
                s3[i] = s1[i];
            }
        }
    }
    cout << s3;
}


#include <iostream>
#include <vector>
#include <algorithm>
#include <string>
#include <map>
#include <set>
#include <cmath>
#include <cstring>
using namespace std;
#define sqr(z) (z) * (z)
#define ch_NO(x) cout << "NO\n"; x = 1 - x;
#define b_NO cout << "NO\n"; break;
#define r_NO cout << "NO\n"; return 0;
#define c_NO cout << "NO\n"; continue;
#define ch_YES(x) cout << "YES\n"; x = 1 - x;
#define b_YES cout << "YES\n"; break;
#define r_YES cout << "YES\n"; return 0;
#define c_YES cout << "YES\n"; continue;
#define sz size()
#define pb push_back
#define int_ "%d",
#define fi first
#define se second
#define mm(k) memset((k), -1, sizeof(k));
#define all(k) (k).begin(), (k).end()
#define forn(i, n) for (int (i) = 0; (i) != (n); i++)
#define nfor(i, n) for (int (i) = (n) - 1; (i) != -1; i--)
#define do_nothing cout << " Work_Error ";
typedef vector<int> vi;
typedef pair<int, int> pii;
typedef long long ll;
typedef long double ld;
struct trio{
    int first;
    int second;
    int third;
};
struct long_trio{
    ll first;
    ll second;
    ll third;
};
double inq(double k, int q)
{
    if (q == 0)
        return 1;
    double l = inq(k, q / 2);
    if (q % 2 == 0)
        return l * l;
    else
        return l * l * k;
}
ll gcd(ll a, ll b)
{
    if (a < b)
        swap(a, b);
    if (b == 0)
        return a;
    return gcd(b, a % b);
}
ll cubr(ll a)
{
    ll l = -1, r = 1e6 + 2;
    while (l < r - 1)
    {
        ll mid = (l + r) / 2;
        if (mid * mid * mid > a)
            r = mid;
        else
            l = mid;
    }
    return l;
}
const ll INF = 1e18 + 2;
const int LIT = 505;
const int BIG = 200001;
string months[12] = {"January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"};
int days[12] = {31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31};
ll fact[13] = {1, 1, 2, 6, 24, 120, 720, 5040, 40320, 362280, 3622800, 39916800, 479001600};
int cx[6] = {1, -1, 0, 0, 0, 0};
int cy[6] = {0, 0, 1, -1, 0, 0};
int cz[6] = {0, 0, 0, 0, 1, -1};
//___________BAZE_________________
ll n, m, ans1, ans2;
ll arr[500100];
ll bs[500100];
string s1, s2, s3;

int main()
{
    cin >> n >> m >> s1 >> s2;
    int m1 = m, m2 = m;
    int differ = 0;
    int ksi = -1;
    for (int i = 0; i < n; i++)
    {
        s3 = s3 + "#";
    }
    for (int i = 0; i < n; i++)
    {
        if (s1[i] != s2[i])
        {
            differ++;
            ksi = i;
        }
    }
    if (differ % 2 == 1)
    {
        s3[ksi] = 'a';
        if (s1[ksi] == 'a' || s2[ksi] == 'a')
        {
            s3[ksi] = 'b';
            if (s1[ksi] == 'b' || s2[ksi] == 'b')
            {
                s3[ksi] = 'c';
            }
        }
        m2--;
        m1--;
        differ--;
    }
    else
    {
        ksi = -1;
    }
    if (differ > m1 + m2)
    {
        cout << -1;
        return 0;
    }
    //cout << ksi << endl;
    int ps = differ;
    int cel = m1 - ps;
    for (int i = 0; i < n; i++)
    {
        if (i != ksi && s1[i] != s2[i])
        {
            if (cel > 1)
            {
                s3[i] = 'a';
                while (s1[i] == s3[i] || s2[i] == s3[i])
                {
                    s3[i]++;
                }
                cel--;
                m1--;
                m2--;
            }
            else
            if (m1 > m2)
            {
                s3[i] = s2[i];
                m1--;
            }
            else
            {
                s3[i] = s1[i];
                m2--;
            }
        }
    }
    for (int i = 0; i < n; i++)
    {
        if (s1[i] == s2[i])
        {
            if (m1 > 0)
            {
                s3[i] = 'a';
                if (s1[i] == 'a')
                    s3[i] = 'b';
                m1--;
            }
            else
            {
                s3[i] = s1[i];
            }
        }
    }
    cout << s3;
}


#include <iostream>
#include <vector>
#include <algorithm>
#include <string>
#include <map>
#include <set>
#include <cmath>
#include <cstring>
using namespace std;
#define sqr(z) (z) * (z)
#define ch_NO(x) cout << "NO\n"; x = 1 - x;
#define b_NO cout << "NO\n"; break;
#define r_NO cout << "NO\n"; return 0;
#define c_NO cout << "NO\n"; continue;
#define ch_YES(x) cout << "YES\n"; x = 1 - x;
#define b_YES cout << "YES\n"; break;
#define r_YES cout << "YES\n"; return 0;
#define c_YES cout << "YES\n"; continue;
#define sz size()
#define pb push_back
#define int_ "%d",
#define fi first
#define se second
#define mm(k) memset((k), -1, sizeof(k));
#define all(k) (k).begin(), (k).end()
#define forn(i, n) for (int (i) = 0; (i) != (n); i++)
#define nfor(i, n) for (int (i) = (n) - 1; (i) != -1; i--)
#define do_nothing cout << " Work_Error ";
typedef vector<int> vi;
typedef pair<int, int> pii;
typedef long long ll;
typedef long double ld;
struct trio{
    int first;
    int second;
    int third;
};
struct long_trio{
    ll first;
    ll second;
    ll third;
};
double inq(double k, int q)
{
    if (q == 0)
        return 1;
    double l = inq(k, q / 2);
    if (q % 2 == 0)
        return l * l;
    else
        return l * l * k;
}
ll gcd(ll a, ll b)
{
    if (a < b)
        swap(a, b);
    if (b == 0)
        return a;
    return gcd(b, a % b);
}
ll cubr(ll a)
{
    ll l = -1, r = 1e6 + 2;
    while (l < r - 1)
    {
        ll mid = (l + r) / 2;
        if (mid * mid * mid > a)
            r = mid;
        else
            l = mid;
    }
    return l;
}
const ll INF = 1e18 + 2;
const int LIT = 505;
const int BIG = 200001;
string months[12] = {"January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"};
int days[12] = {31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31};
ll fact[13] = {1, 1, 2, 6, 24, 120, 720, 5040, 40320, 362280, 3622800, 39916800, 479001600};
int cx[6] = {1, -1, 0, 0, 0, 0};
int cy[6] = {0, 0, 1, -1, 0, 0};
int cz[6] = {0, 0, 0, 0, 1, -1};
//___________BAZE_________________
ll n, m, ans1, ans2;
ll arr[500100];
ll bs[500100];
string s1, s2, s3;

int main()
{
    cin >> n >> m >> s1 >> s2;
    int differ1 = 0, differ2 = 0;
    for (int i = 0; i < n; i++)
    {
        s3 = s3 + '#';
    }
    for (int i = 0; i < n; i++)
    {
        if (s1[i] != s2[i])
        {
            if (differ1 < differ2)
            {
                s3[i] = s2[i];
                differ1++;
            }
            else
            {
                s3[i] = s1[i];
                differ2++;
            }
        }
    }
    if (differ1 > m || differ2 > m || differ1 != differ2)
    {
        cout << -1;
        return 0;
    }
    for (int i = 0; i < n; i++)
    {
        if (s1[i] == s2[i])
        {
            if (differ1 > m)
            {
                s3[i] = s1[i];
            }
            else
            {
                if (s1[i] != 'a')
                    s3[i] = 'a';
                else
                    s3[i] = 'b';
                differ1++;
            }
        }
    }
    cout << s3;
}


#include <iostream>
#include <vector>
#include <algorithm>
#include <string>
#include <map>
#include <set>
#include <cmath>
#include <cstring>
using namespace std;
#define sqr(z) (z) * (z)
#define ch_NO(x) cout << "NO\n"; x = 1 - x;
#define b_NO cout << "NO\n"; break;
#define r_NO cout << "NO\n"; return 0;
#define c_NO cout << "NO\n"; continue;
#define ch_YES(x) cout << "YES\n"; x = 1 - x;
#define b_YES cout << "YES\n"; break;
#define r_YES cout << "YES\n"; return 0;
#define c_YES cout << "YES\n"; continue;
#define sz size()
#define pb push_back
#define int_ "%d",
#define fi first
#define se second
#define mm(k) memset((k), -1, sizeof(k));
#define all(k) (k).begin(), (k).end()
#define forn(i, n) for (int (i) = 0; (i) != (n); i++)
#define nfor(i, n) for (int (i) = (n) - 1; (i) != -1; i--)
#define do_nothing cout << " Work_Error ";
typedef vector<int> vi;
typedef pair<int, int> pii;
typedef long long ll;
typedef long double ld;
struct trio{
    int first;
    int second;
    int third;
};
struct long_trio{
    ll first;
    ll second;
    ll third;
};
double inq(double k, int q)
{
    if (q == 0)
        return 1;
    double l = inq(k, q / 2);
    if (q % 2 == 0)
        return l * l;
    else
        return l * l * k;
}
ll gcd(ll a, ll b)
{
    if (a < b)
        swap(a, b);
    if (b == 0)
        return a;
    return gcd(b, a % b);
}
ll cubr(ll a)
{
    ll l = -1, r = 1e6 + 2;
    while (l < r - 1)
    {
        ll mid = (l + r) / 2;
        if (mid * mid * mid > a)
            r = mid;
        else
            l = mid;
    }
    return l;
}
const ll INF = 1e18 + 2;
const int LIT = 505;
const int BIG = 200001;
string months[12] = {"January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"};
int days[12] = {31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31};
ll fact[13] = {1, 1, 2, 6, 24, 120, 720, 5040, 40320, 362280, 3622800, 39916800, 479001600};
int cx[6] = {1, -1, 0, 0, 0, 0};
int cy[6] = {0, 0, 1, -1, 0, 0};
int cz[6] = {0, 0, 0, 0, 1, -1};
//___________BAZE_________________
ll n, m, ans1, ans2;
ll arr[500100];
ll bs[500100];
string s1, s2, s3;

int main()
{
    cin >> n >> m >> s1 >> s2;
    int m1 = m, m2 = m;
    int differ = 0;
    int ksi = -1;
    for (int i = 0; i < n; i++)
    {
        s3 = s3 + "#";
    }
    for (int i = 0; i < n; i++)
    {
        if (s1[i] != s2[i])
        {
            differ++;
            ksi = i;
        }
    }
    if (differ % 2 == 1)
    {
        s3[ksi] = 'a';
        if (s1[ksi] == 'a' || s2[ksi] == 'a')
        {
            s3[ksi] = 'b';
            if (s1[ksi] == 'b' || s2[ksi] == 'b')
            {
                s3[ksi] = 'c';
            }
        }
        m2--;
        m1--;
        differ--;
    }
    else
    {
        ksi = -1;
    }
    if (differ > m1 + m2)
    {
        cout << -1;
        return 0;
    }
    //cout << ksi << endl;
    int cel = -(differ - m1 - m1);
    for (int i = 0; i < n; i++)
    {
        if (i != ksi && s1[i] != s2[i])
        {
            if (cel > 0)
            {
                s3[i] = 'a';
                while (s1[i] == s3[i] || s2[i] == s3[i])
                {
                    s3[i]++;
                }
                cel--;
                m1--;
                m2--;
            }
            else
            if (m1 > m2)
            {
                s3[i] = s2[i];
                m1--;
            }
            else
            {
                s3[i] = s1[i];
                m2--;
            }
        }
    }
    for (int i = 0; i < n; i++)
    {
        if (s1[i] == s2[i])
        {
            if (m1 > 0)
            {
                s3[i] = 'a';
                if (s1[i] == 'a')
                    s3[i] = 'b';
                m1--;
            }
            else
            {
                s3[i] = s1[i];
            }
        }
    }
    cout << s3;
}


#include <iostream>
#include <vector>
#include <algorithm>
#include <string>
#include <map>
#include <set>
#include <cmath>
#include <cstring>
using namespace std;
#define sqr(z) (z) * (z)
#define ch_NO(x) cout << "NO\n"; x = 1 - x;
#define b_NO cout << "NO\n"; break;
#define r_NO cout << "NO\n"; return 0;
#define c_NO cout << "NO\n"; continue;
#define ch_YES(x) cout << "YES\n"; x = 1 - x;
#define b_YES cout << "YES\n"; break;
#define r_YES cout << "YES\n"; return 0;
#define c_YES cout << "YES\n"; continue;
#define sz size()
#define pb push_back
#define int_ "%d",
#define fi first
#define se second
#define mm(k) memset((k), -1, sizeof(k));
#define all(k) (k).begin(), (k).end()
#define forn(i, n) for (int (i) = 0; (i) != (n); i++)
#define nfor(i, n) for (int (i) = (n) - 1; (i) != -1; i--)
#define do_nothing cout << " Work_Error ";
typedef vector<int> vi;
typedef pair<int, int> pii;
typedef long long ll;
typedef long double ld;
struct trio{
    int first;
    int second;
    int third;
};
struct long_trio{
    ll first;
    ll second;
    ll third;
};
double inq(double k, int q)
{
    if (q == 0)
        return 1;
    double l = inq(k, q / 2);
    if (q % 2 == 0)
        return l * l;
    else
        return l * l * k;
}
ll gcd(ll a, ll b)
{
    if (a < b)
        swap(a, b);
    if (b == 0)
        return a;
    return gcd(b, a % b);
}
ll cubr(ll a)
{
    ll l = -1, r = 1e6 + 2;
    while (l < r - 1)
    {
        ll mid = (l + r) / 2;
        if (mid * mid * mid > a)
            r = mid;
        else
            l = mid;
    }
    return l;
}
const ll INF = 1e18 + 2;
const int LIT = 505;
const int BIG = 200001;
string months[12] = {"January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"};
int days[12] = {31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31};
ll fact[13] = {1, 1, 2, 6, 24, 120, 720, 5040, 40320, 362280, 3622800, 39916800, 479001600};
int cx[6] = {1, -1, 0, 0, 0, 0};
int cy[6] = {0, 0, 1, -1, 0, 0};
int cz[6] = {0, 0, 0, 0, 1, -1};
//___________BAZE_________________
ll n, m, ans1, ans2;
ll arr[500100];
ll bs[500100];
string s1, s2;
char s3[500000];

int main()
{
    cin >> n >> m >> s1 >> s2;
    int m1 = m, m2 = m;
    int differ = 0;
    int ksi = -1;
    for (int i = 0; i < n; i++)
    {
        s3[i] = '#';
    }
    for (int i = 0; i < n; i++)
    {
        if (s1[i] != s2[i])
        {
            differ++;
            ksi = i;
        }
    }
    if (differ % 2 == 1)
    {
        s3[ksi] = 'a';
        if (s1[ksi] == 'a' || s2[ksi] == 'a')
        {
            s3[ksi] = 'b';
            if (s1[ksi] == 'b' || s2[ksi] == 'b')
            {
                s3[ksi] = 'c';
            }
        }
        m2--;
        m1--;
        differ--;
    }
    else
    {
        ksi = -1;
    }
    if (differ > m1 + m2)
    {
        cout << -1;
        return 0;
    }
    //cout << ksi << endl;
    int cel = -(differ - m1 - m1);
    for (int i = 0; i < n; i++)
    {
        if (i != ksi && s1[i] != s2[i])
        {
            if (cel > 0)
            {
                s3[i] = 'a';
                while (s1[i] == s3[i] || s2[i] == s3[i])
                {
                    s3[i]++;
                }
                cel--;
                m1--;
                m2--;
            }
            else
            if (m1 > m2)
            {
                s3[i] = s2[i];
                m1--;
            }
            else
            {
                s3[i] = s1[i];
                m2--;
            }
        }
    }
    for (int i = 0; i < n; i++)
    {
        if (s1[i] == s2[i])
        {
            if (m1 > 0)
            {
                s3[i] = 'a';
                if (s1[i] == 'a')
                    s3[i] = 'b';
                m1--;
            }
            else
            {
                s3[i] = s1[i];
            }
        }
    }
    cout << s3;
}


#include <iostream>
#include <vector>
#include <algorithm>
#include <string>
#include <map>
#include <set>
#include <cmath>
#include <cstring>
using namespace std;
#define sqr(z) (z) * (z)
#define ch_NO(x) cout << "NO\n"; x = 1 - x;
#define b_NO cout << "NO\n"; break;
#define r_NO cout << "NO\n"; return 0;
#define c_NO cout << "NO\n"; continue;
#define ch_YES(x) cout << "YES\n"; x = 1 - x;
#define b_YES cout << "YES\n"; break;
#define r_YES cout << "YES\n"; return 0;
#define c_YES cout << "YES\n"; continue;
#define sz size()
#define pb push_back
#define int_ "%d",
#define fi first
#define se second
#define mm(k) memset((k), -1, sizeof(k));
#define all(k) (k).begin(), (k).end()
#define forn(i, n) for (int (i) = 0; (i) != (n); i++)
#define nfor(i, n) for (int (i) = (n) - 1; (i) != -1; i--)
#define do_nothing cout << " Work_Error ";
typedef vector<int> vi;
typedef pair<int, int> pii;
typedef long long ll;
typedef long double ld;
struct trio{
    int first;
    int second;
    int third;
};
struct long_trio{
    ll first;
    ll second;
    ll third;
};
double inq(double k, int q)
{
    if (q == 0)
        return 1;
    double l = inq(k, q / 2);
    if (q % 2 == 0)
        return l * l;
    else
        return l * l * k;
}
ll gcd(ll a, ll b)
{
    if (a < b)
        swap(a, b);
    if (b == 0)
        return a;
    return gcd(b, a % b);
}
ll cubr(ll a)
{
    ll l = -1, r = 1e6 + 2;
    while (l < r - 1)
    {
        ll mid = (l + r) / 2;
        if (mid * mid * mid > a)
            r = mid;
        else
            l = mid;
    }
    return l;
}
const ll INF = 1e18 + 2;
const int LIT = 505;
const int BIG = 200001;
string months[12] = {"January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"};
int days[12] = {31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31};
ll fact[13] = {1, 1, 2, 6, 24, 120, 720, 5040, 40320, 362280, 3622800, 39916800, 479001600};
int cx[6] = {1, -1, 0, 0, 0, 0};
int cy[6] = {0, 0, 1, -1, 0, 0};
int cz[6] = {0, 0, 0, 0, 1, -1};
//___________BAZE_________________
ll n, m, ans1, ans2;
ll arr[500100];
ll bs[500100];
string s1, s2, s3;

int main()
{
    cin >> n >> m >> s1 >> s2;
    int differ1 = 0, differ2 = 0;
    for (int i = 0; i < n; i++)
    {
        s3 = s3 + '#';
    }
    for (int i = 0; i < n; i++)
    {
        if (s1[i] != s2[i])
        {
            if (differ1 < differ2)
            {
                s3[i] = s2[i];
                differ1++;
            }
            else
            {
                s3[i] = s1[i];
                differ2++;
            }
        }
    }
    if (differ1 > m || differ2 > m || differ1 != differ2)
    {
        cout << -1;
        return 0;
    }
    for (int i = 0; i < n; i++)
    {
        if (s1[i] == s2[i])
        {
            if (differ1 >= m)
            {
                s3[i] = s1[i];
            }
            else
            {
                if (s1[i] != 'a')
                    s3[i] = 'a';
                else
                    s3[i] = 'b';
                differ1++;
            }
        }
    }
    cout << s3;
}


#include <iostream>
#include <vector>
#include <algorithm>
#include <string>
#include <map>
#include <set>
#include <cmath>
#include <cstring>
using namespace std;
#define sqr(z) (z) * (z)
#define ch_NO(x) cout << "NO\n"; x = 1 - x;
#define b_NO cout << "NO\n"; break;
#define r_NO cout << "NO\n"; return 0;
#define c_NO cout << "NO\n"; continue;
#define ch_YES(x) cout << "YES\n"; x = 1 - x;
#define b_YES cout << "YES\n"; break;
#define r_YES cout << "YES\n"; return 0;
#define c_YES cout << "YES\n"; continue;
#define sz size()
#define pb push_back
#define int_ "%d",
#define fi first
#define se second
#define mm(k) memset((k), -1, sizeof(k));
#define all(k) (k).begin(), (k).end()
#define forn(i, n) for (int (i) = 0; (i) != (n); i++)
#define nfor(i, n) for (int (i) = (n) - 1; (i) != -1; i--)
#define do_nothing cout << " Work_Error ";
typedef vector<int> vi;
typedef pair<int, int> pii;
typedef long long ll;
typedef long double ld;
struct trio{
    int first;
    int second;
    int third;
};
struct long_trio{
    ll first;
    ll second;
    ll third;
};
double inq(double k, int q)
{
    if (q == 0)
        return 1;
    double l = inq(k, q / 2);
    if (q % 2 == 0)
        return l * l;
    else
        return l * l * k;
}
ll gcd(ll a, ll b)
{
    if (a < b)
        swap(a, b);
    if (b == 0)
        return a;
    return gcd(b, a % b);
}
ll cubr(ll a)
{
    ll l = -1, r = 1e6 + 2;
    while (l < r - 1)
    {
        ll mid = (l + r) / 2;
        if (mid * mid * mid > a)
            r = mid;
        else
            l = mid;
    }
    return l;
}
const ll INF = 1e18 + 2;
const int LIT = 505;
const int BIG = 200001;
string months[12] = {"January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"};
int days[12] = {31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31};
ll fact[13] = {1, 1, 2, 6, 24, 120, 720, 5040, 40320, 362280, 3622800, 39916800, 479001600};
int cx[6] = {1, -1, 0, 0, 0, 0};
int cy[6] = {0, 0, 1, -1, 0, 0};
int cz[6] = {0, 0, 0, 0, 1, -1};
//___________BAZE_________________
ll n, m, ans1, ans2;
ll arr[500100];
ll bs[500100];
string s1, s2, s3;

int main()
{
    cin >> n >> m >> s1 >> s2;
    int m1 = m, m2 = m;
    int differ = 0;
    int ksi = -1;
    for (int i = 0; i < n; i++)
    {
        s3 = s3 + "#";
    }
    for (int i = 0; i < n; i++)
    {
        if (s1[i] != s2[i])
        {
            differ++;
            ksi = i;
        }
    }
    if (differ % 2 == 1)
    {
        s3[ksi] = 'a';
        if (s1[ksi] == 'a' || s2[ksi] == 'a')
        {
            s3[ksi] = 'b';
            if (s1[ksi] == 'b' || s2[ksi] == 'b')
            {
                s3[ksi] = 'c';
            }
        }
        m2--;
        m1--;
        differ--;
    }
    if (differ > m1 + m2)
    {
        cout << -1;
        return 0;
    }
    else
    {
        ksi = -1;
    }
    int ps = differ;
    int cel = m1 - ps;
    for (int i = 0; i < n; i++)
    {
        if (i != ksi && s1[i] != s2[i])
        {
            if (cel > 0)
            {
                s3[i] = 'a';
                while (s1[i] == s3[i] || s2[i] == s3[i])
                {
                    s3[i]++;
                }
                cel--;
                m1--;
                m2--;
            }
            else
            if (m1 > m2)
            {
                s3[i] = s2[i];
                m1--;
            }
            else
            {
                s3[i] = s1[i];
                m2--;
            }
        }
    }
    for (int i = 0; i < n; i++)
    {
        if (s1[i] == s2[i])
        {
            if (m1 > 0)
            {
                s3[i] = 'a';
                if (s1[i] == 'a')
                    s3[i] = 'b';
                m1--;
            }
            else
            {
                s3[i] = s1[i];
            }
        }
    }
    cout << s3;
}


#include <bits/stdc++.h>

using namespace std;

typedef long long ll;
typedef pair<int, int> pii;

#define pb push_back
#define mp make_pair

int n, t;
string s1, s2;

int main()
{
    ios_base::sync_with_stdio(0);
    cin >> n >> t >> s1 >> s2;
    int cur = 0;
    string ans;
    ans.resize(n);
    for(int i = 0; i < n; i++){
        if(s1[i] != s2[i]) cur++;
    }
    if(t < cur){
        cout << -1 << endl;
        exit(0);
    }
    for(int i = 0; i < n && t > 0; i++){
        if(s1[i] != s2[i]){
            if(s1[i] != 'a' && s2[i] != 'a') ans[i] = 'a';
            else if(s1[i] != 'b' && s2[i] != 'b') ans[i] = 'b';
            else ans[i] = 'c';
            t--;
        }
    }

    for(int i = 0; i < n; i++){
        if(s1[i] == s2[i]){
            if(t > 0){
                if(s1[i] == 'a') ans[i] = 'b';
                else ans[i] = 'a';
                t--;
            }
            else ans[i] = s1[i];
        }
    }

    cout << ans;

    return 0;
}


#include <bits/stdc++.h>

using namespace std;

typedef long long ll;
typedef pair<int, int> pii;

#define pb push_back
#define mp make_pair

int n, t;
string s1, s2;

int main()
{
    ios_base::sync_with_stdio(0);
    cin >> n >> t >> s1 >> s2;
    int cur = 0;
    for(int i = 0; i < n; i++){
        if(s1[i] != s2[i]) cur++;
    }
    if(cur != t){
        cout << -1 << endl;
        exit(0);
    }
    for(int i = 0; i < n; i++){
        if(s1[i] == s2[i]) cout << s1[i];
        else{
            if(s1[i] == 'a') cout << 'b';
            else cout << 'a';
        }
    }
    return 0;
}


#include <bits/stdc++.h>

using namespace std;

typedef long long ll;
typedef pair<int, int> pii;

#define pb push_back
#define mp make_pair

int n, t;
string s1, s2;

int main()
{
    ios_base::sync_with_stdio(0);
    cin >> n >> t >> s1 >> s2;
    int cur = 0;
    string ans;
    ans.assign(n, '0');
    for(int i = 0; i < n; i++){
        if(s1[i] != s2[i]) cur++;
    }
    if(t < (cur + 1) / 2){
        cout << -1 << endl;
        exit(0);
    }

    int last = 0;
    for(int i = 0; i < n && t < cur; i++){
        if(s1[i] != s2[i]){
            if(last == 1) cur -= 2, t--;
            if(last == 0) ans[i] = s2[i];
            else ans[i] = s1[i];
            last = 1 - last;
        }
    }

    for(int i = 0; i < n && t > 0; i++){
        if(ans[i] != '0') continue;
        if(s1[i] != s2[i]){
            for(int j = 'a'; j <= 'z'; j++){
                if(s1[i] != j && s2[i] != j){
                    ans[i] = j;
                    break;
                }
            }
            t--;
        }
    }

    for(int i = 0; i < n; i++){
        if(s1[i] == s2[i]){
            if(t > 0){
                if(s1[i] == 'a') ans[i] = 'b';
                else ans[i] = 'a';
                t--;
            }
            else ans[i] = s1[i];
        }
    }

    cout << ans;

    return 0;
}