What book grouped into three categories: comedies, histories, and tragedies, contains a play believed to have been written in 1599? 
As You Like It: As You Like It is a pastoral comedy by William Shakespeare believed to have been written in 1599 and first published in the First Folio in 1623. Shakespearean comedy: In the First Folio, the plays of William Shakespeare were grouped into three categories: comedies, histories, and tragedies, though today many scholars recognize a fourth category, romance, to describe the specific types of comedies that appear as Shakespeare's later works.
First Folio