| UTPC Spring 2023 Contest (HS) |
|---|
| Finished |
Ashley Ketchup is training to be the best dragon collector in the world, and she needs your help.
Whenever she collects a dragon, she keeps them in a small, spherical habitat, known as a "Dragon Ball". Ashley has many of these dragon balls, but she wants to make sure that the dragons she puts in there are always happy. Dragons come in all shapes and sizes, and can be easily intimidated by other dragons. Ashley wants to keep track of the dragons as she adds more to her collection and make sure they are always doing ok. Can you help Ashley?
The first line contains a single integer, $$$t$$$ ($$$1 \leq t \leq 100$$$), representing the number of actions that Ashley performs.
Then, $$$n$$$ lines follow, which will be in one of the following forms:
Each time Ashley asks about a habitat, output the name of the smallest dragon, and the name of the largest dragon, in that order.
9 add garden saladmander 5 add garden leekachu 6 add mountain coldasaur 8 ask garden ask mountain add garden myrtle 2 add lake fishy 3 ask garden ask lake
saladmander leekachu coldasaur coldasaur myrtle leekachu fishy fishy
| Name |
|---|


