use python implement some useful data structure