#pragma GCC target("avx2") #pragma GCC optimize("O3") #pragma GCC optimize("unroll-loops") #include #include #define rep(i, a, b) for (ll i = (ll)(a); i < (ll)(b); i++) using namespace atcoder; using namespace std; typedef long long ll; void solve() { char s, h; int n; cin >> s >> h >> n; if (n == 1 && s != h) { cout << "-1\n"; return; } string ans; ans += s; while (ans.size() < n) ans += h; cout << ans << '\n'; } int main() { ios::sync_with_stdio(false); cin.tie(nullptr); cout << fixed << setprecision(15); solve(); }