Bell inequalities for three particles