the play is inspired on hamlet by william shakespeare