Second programming homework - Tries and Graphs