Beings come together and associate according to disposition. The unashamed come together and associate with the unashamed; and other pairs of dispositions are mentioned.
Ahirikamūlaka sutta - Beginning With Unashamed
At Sāvatthi.
"Bhikkhus, beings come together and associate according to disposition. The unashamed come together and associate with the unashamed; the morally reckless come together and associate with the morally reckless; the undiscerning come together and associate with the undiscerning; the conscientious come together and associate with the conscientious; those with fear of wrongdoing come together and associate with those with fear of wrongdoing; the wise come together and associate with the wise.
The unashamed come together and associate with the unashamed; the morally reckless come together and associate with the morally reckless; the undiscerning come together and associate with the undiscerning; the conscientious come together and associate with the conscientious; the very learned come together and associate with the very learned; the wise come together and associate with the wise.
The unashamed come together and associate with the unashamed; the unmindful come together and associate with the unmindful; the undiscerning come together and associate with the undiscerning; the conscientious come together and associate with the conscientious; those attending mindfully come together and associate with those attending mindfully; the wise come together and associate with the wise."