鸡口牛后 = Literally, it means '[prefer to be a small and clean] chicken's mouth, [rather than a big and filthy] cow's rear'. This idiom is a metaphor of preferring to have one's autonomy in a small place, rather than being in a big place yet ruled by others.