Fish lay eggs. There were fish long before there were chickens. So the egg came first.