“Imitation is the sincerest form of flattery that mediocrity can pay to greatness” by Oscar Wilde.
"That mediocrity can pay to GREATNESS" is usually left out, but it has importance.
The quote is often used as an excuse for copying or plagiarizing, but in the realm of intellectual property, commerce, etc., this can have serious consequences.