Your script works as advertised, and the fact that it's
wordier than necessary is obviously deliberate, so that beginners
can follow it more easily.
The one problem I *do* have with it is that there is no-reason to
hard-code to number of elements in each list. Much better to use
the $# construct to return the size of the list. In other words: