While going through the rake compositions of different trains, I have observed that the AC coaches are sometimes at the beginning and sometimes at the end of the train. Does anyone know- on what basis these AC coaches are arranged either at the front or back?