#include using namespace std; #define rep(i, a, b) for (int i = a; i < b; i++) using ll = long long; int main(){ char s, e; int n; cin >> s >> e >> n; if(n == 1) { if(s == e) cout << s << endl; else cout << -1 << endl; } else { string t; t += s; int j = 0; rep(i, 0, n - 2) { char c = char(j + 'a'); if(c == s || c == e) { j++; c = char(j + 'a'); } if(c == s || c == e) { j++; c = char(j + 'a'); } t += c; j++; } t += e; cout << t << endl; } }