Trick-or-treating has existed since medieval times.