Tugan Roulette


Submit solution

Points: 1
Time limit: 2.0s
Memory limit: 256M

Author:
Problem type
Allowed languages
C, C++, Java, Python, Rust

Tuga has created a new game based on Russian Roulette! In this game two players are given a pistol with N chambers in the drum. The drum of the pistol acts as a circular queue; the chambers are arranged such that after the last chamber is fired, the next shot comes from the first chamber. Tuga then loads some number of the chambers with bullets, and hands it to the two players. The two players are then allowed to either shoot the pistol immediately, or spin the chamber again and then shoot the pistol.

While playing, your opponent spins the drum, and takes a shot from a random chamber, which is empty. Given the location of all bullets in the barrel, your task is to determine whether you have a higher probability of not shooting a bullet if you fire the pistol again, or spin the drum and then fire it.

Input

The first line contains a single integer N (3 \leq N \leq 10^5) - The number of chambers in the drum.

The second line contains N integers C_1,\dots,C_N (C_i = 0 \ or \ 1) representing each of the chambers. If C_i is 1, then the chamber has a bullet in it, otherwise it will be 0, indicating it is empty.

Output

Output Spin if there is a higher probability of not firing a bullet if you spin the barrel first, and output Shoot otherwise. If they have the same probability, output Shoot, as spinning takes extra work.

Example

Input 1
6
1 0 1 0 0 0
Output 1
Spin

There is a probability of firing a bullet with \frac13 chance when selecting a random chamber (spinning the drum). However, if we know that the last selected chamber was empty, then we know that the next chamber contains a bullet \frac24 times. This is a higher probability of containing a bullet, so we should choose to spin.

Input 2
6
0 0 1 1 1 0
Output 2
Shoot

In this case, Shoot gives us a \frac13 of hitting a bullet, while Spin gives us a \frac12 chance.


Comments

There are no comments at the moment.