Shakespeare wrote Cruel only to be kind in what play?

Question
Shakespeare wrote Cruel only to be kind in what play?
Answer
Hamlet