蛇の道は蛇(じゃのみちはへび)

Japanese vocabulary

Meaning: the wolf knows what the ill beast thinks; it takes one to know one; it takes a thief to catch a thief

See it used in real works