initial code of supermarket queue exercise