Similar Items: Distributed controller synthesis for deadlock avoidance