Where does “과자(菓子)” come from?

Words derived from “과자(菓子)