A functional hierarchical organization of the protein sequence space