a first working version
notice that order dynamically changes as you enter values to a map
124 accepted!