add print method to the Dict and List classes