Rating:
Solved by: @dm
TL;DR:
* pick name such that characters 17th through 20th correspond to the flag printing routine’s address 0x8048878
* pick prices such that the node for the item you named moves to the root of the tree that stores the (item,price) entries