Confucius said this quote

What you do not want others to do to you do not do to others.