825 apples were placed equally in cartons A, B and C. After some apples had been transferred from carton A to carton B, the number of apples in carton A is 1/4 of those in carton B. Then some apples were transferred from carton B to carton C and the number of apples in carton B becomes 2/3 of those in carton C. How many apples were there in cartons A, B and C in the end?