($s,$e,$n)=glob<>;print$n>1|$s eq$e?$s x($n-1).$e:-1