The classical Dining philosophers problem, in various programming languages.
See some hint.
Each philosopher grabs the fork on their left, then the fork on their right. To avoid a deadlock where each philosophers has grabbed the fork on their left, but become unable to grab the fork on their right, the last philospher grabs the forks in reverse order (right then left).