#include using namespace std; int main() { char s, e; cin >> s >> e; int N; cin >> N; if (N == 1) { if (s == e) cout << s << "\n"; else cout << -1 << "\n"; return 0; } string answer = string(N, 'k'); answer[0] = s; answer[N - 1] = e; cout << answer << "\n"; return 0; }