C. Echoes of the Runes
time limit per test
2 seconds
memory limit per test
512 megabytes
input
standard input
output
standard output
And no one sings me lullabies,

And no one makes me close my eyes

— Pink Floyd, Echoes

$$$~\\$$$

Deep in the Arctic permafrost lies an obsidian monolith etched with glowing celestial runes. These symbols — said to hold the fabric of spacetime — shift positions during auroral storms. Ancient texts warn that if the runes ever freeze in a "disordered sequence," two must be swapped exactly once to restore cosmic balance. Any additional tampering would collapse reality into quantum limbo.

When Vistar discovers the monolith frozen as a sequence, its hum resonates with impending doom. The decoded notes reveal: "One swap averts the rupture. Two swaps lead to chaos."

Now, as the ground trembles, he must answer: Are the runes already ordered by fate's design? If not, do exactly two exist whose swap would align them?

More formally, given $$$n$$$ numbers, please determine:

  • Are the numbers already in ascending order?
  • If not, can swapping two of them restore ascending order?
Input

The first line contains a single integer $$$n$$$ $$$(1\le n\le 1000)$$$ — the number of runes.

The second line contains an array $$$a$$$ of length $$$n$$$ $$$(1 \le a_i\le 10^9)$$$.

Output

If the runes are already in or can be restored in ascending order, output "Sorted". Otherwise, output "Failed".

Examples
Input
5
1 4 3 2 5
Output
Sorted
Input
4
4 4 2 1
Output
Failed