Quick program using dictionaries.