Hamlet

The prompt for this essay is: It seems like half the characters in Hamlet are foils for Hamlet, and the rest of them are foils for each other . How do the different foils bring out different aspects of Hamlets character? What other effects does all this doubling produce ?