I used a 3 legged puller to remove and replace the gears - but this is totally dependent on how good or bad the interference fit of the gear on the shaft is.
If you can't use this method you'll have to remove the shafts from the gearbox which means the clutch and sprocket will have to be removed.