Well it's pretty easy to do this task using arrays, but since you don't want to use it you'll have to think some more :)