This page is still under construction.

Parts of this page are still being built. What you see may change.

Emergency Meeting

Interview

Time limit1sMemory limit256 MB

Summary
Given each player's vote or skip, find the player with the most votes, ejecting nobody on a tie.
Level

Easy2 of 10

Topics
Implementation, Array, Simulation
Solved
No attempts yet

Problem

The players have gathered in one place for an emergency meeting. In this meeting they will vote to eject one player suspected of being the impostor.

Among the N players, exactly one is the impostor and the rest are crewmates. No player knows whether another player is the impostor or a crewmate.

Each player votes for one player, or skips their vote. The player with the most votes is ejected. If two or more players tie for the most votes, nobody is ejected.

If the number of players who skipped their vote is greater than or equal to the number of votes received by the player with the most votes, the player with the most votes is still ejected.

The voting result of each player is given. Who gets ejected?

Input

The first line gives the number of players N. (3 ≤ N ≤ 100)

The second line gives N integers separated by spaces. The i-th integer Xi means that player i voted for player Xi. If Xi is 0, player i skipped their vote.

Output

Print the number of the player who is ejected as a result of the vote.

If nobody is ejected, print skipped (without the quotes).

Examples2

  1. Example 1

    Input
    5
    3 1 4 3 0
    
    Expected output
    3
    
  2. Example 2

    Input
    7
    2 1 1 7 6 3 3
    
    Expected output
    skipped