What we normally ask is how many impacts did you feel?
If you felt two, then it is fair to assume that both cars hit you, if you felt one, then the car at the very back has most likely shunted the middle car into you.
However, as pointed out, your insurance company will sort this out - we generally look to recover off the car that was immediately behind you in the first instance, and if they later establish that they are not at fault, they recover it from the car behind them