Extract elements of tripla, similar fst and snd of duplas