Fish can keep track of complex social relationships.