who did shakespeare write his play hamlet for