Equilibrium prices

Suppose that three firms which produce a homogeneous output will compete by choosing prices and the market price P is the minimum of the three prices that are chosen. The market demand is determined by the equation p=12-Q. The first firm has a marginal cost of 2, the second has a marginal cost of 4 and the third has a marginal cost of 6. As usual, in case one firm charges strictly less than the others, all customers choose that firm. However the customers favor the first firm over the second and third; and the second one over the third, and will always shop from the more favorable firm if there is a tie in prices. Assume that the firms can only choose integer prices, i.e., prices like 1/2 or 2 1/2 are not allowed. Write down the profit expression as function of chosen prices and derive the best response. Find the equilibrium prices and profits.