Here's the answer -
number all the 6 surfaces from first to last
charge on 1 = -q/2
2 = 3q/2
3 = -3q/2
4 = +3q/2
5 = -3q/2
6 = -q/2
just remember this = If there are n plates and charges given on each are q1,q2,q3,q4,... qn . Therefore , charge on outer surfaces of first and last plate is (q1+q2+q3+q4+q5+.......qn)/2