Selecting consecutive terms in GP