Dictionary problem passes all tests but I want to improve it. The printing isn't terribly elegant and I don't use regex at all. Better if I did.
refactored timer for clarity