| UTPC Contest 03-03-23 Div. 2 (Beginner) |
|---|
| Закончено |
You have been struggling to organize your wardrobe for years now. But what's the point? After all, sticking all your clothes in a big pile hasn't failed you yet.
The pile works as follows. Initially, it starts out empty. Each time you clean some clothing, you'll throw it on top of the pile. Whenever you need a new outfit, you'll grab whichever article of clothing is on top of the pile to wear.
However, once in a while it comes time to run the Iditarod, and you can't just pick any outfit. To make sure you win the race, you need your trusty snowcoat! When this happens, you carefully remove your trusty snowcoat from the pile, leaving the ordering of all other clothing the same.
One day (today), you start thinking about the simplicity of your outfit selection scheme. It almost feels like it could be written as an algorithm...
The first line of input contains a single integer $$$T (1 \leq T \leq 1000)$$$, representing the number of events that will occur. Then, $$$T$$$ lines follow, each representing a single action you perform. Each line will be in one of the following forms:
For each of the $$$\text{get}$$$ or $$$\text{iditarod}$$$ events, output the appropriate response. It is guaranteed that at least one of these events will exist.
6 put shirt put snowcoat iditarod iditarod put shirt2 get
winner winner chicken dinner :) oopsimcold :( shirt2
| Название |
|---|


