Preheat the oven to 180ºC/350ºF/gas and grease and line the base of a 23cm square cake tin. Core and coarsely grate 2 of the apples and finely slice the remaining apple. Melt 85g of the sugar and the margarine in a pan, then pour into the prepared tin. Top with the sliced apple in a single layer. Combine the flour, 110g of sugar, the bicarbonate of soda and mixed spice in a bowl.