Doesn't sound like anything more than a matrix of the 3 variables you brought up. A set of interlinked LinkedLists could handle this problem with ease.