Program to sort marbles