D. Outfit Ordeal
time limit per test
1 second
memory limit per test
256 megabytes
input
standard input
output
standard output

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...

Input

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:

  • $$$\text{put }s$$$: put the clothing item $$$s$$$ onto the pile ($$$1 \leq |s| \leq 10$$$). $$$s$$$ will only consist of alphanumeric characters. $$$s$$$ will be distinct from the names of any other clothing items in the pile.
  • $$$\text{get}$$$: take an article of clothing off the pile to wear, and output its name. If the pile is empty, output "$$$\text{empty}$$$".
  • $$$\text{iditarod}$$$: search through your pile for an article of clothing named "snowcoat". If you can find the snowcoat, output "$$$\text{winner winner chicken dinner :)}$$$" and remove it from the pile. Otherwise, output "$$$\text{oopsimcold :(}$$$".
Output

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.

Example
Input
6
put shirt
put snowcoat
iditarod
iditarod
put shirt2
get
Output
winner winner chicken dinner :)
oopsimcold :(
shirt2