how to take dictionary input