Mayor wins 2-week write-in campaign to succeed Kentucky lawmaker who died