Cats are so hard to organize "herding cats" is often used to refer to tasks that are impossible. So imagine how incredible Prince Shotoku must be when helps the government of Asuka period Japan get it's act together!
and they were then given a cap 
that would designate their job.
se otorgaban unos sombreros
que designaban su rango.
e cada um recebeu um chapéu
para designar seu trabalho.