How it works
の (of) ties the owner to the thing: “your hat”. Then は (topic) raises that hat as the topic, and the question word どれ (which) asks the listener to point it out among several. No verb or です (is) is needed — the question word alone, in casual speech, finishes the thought.