import qualified Data.ByteString.Char8 as B
import qualified Data.IntSet as S
import qualified Data.Array.IArray as A
import qualified Data.Graph as G
import Data.Maybe
import Data.Bool

main = do
  n <- readLn
  ps <- map (fst . fromJust . B.readInt) . B.words <$> B.getLine
  let g = G.buildG (1,n) (zip ps [1..n])
  putStrLn $ bool "IMPOSSIBLE" "POSSIBLE" (namori n g)

namori n g = (odd n && p2) || (even n && (p1 || p2))
  where
    p1 = all even ds
    p2 = length (filter odd ds) == 2
    ds = zipWith (+) (A.elems (G.outdegree g)) (A.elems (G.indegree g))

type Vertex = Int
type Vertexes = S.IntSet
type Edge = (Vertex, Vertex)
type Graph = A.Array Vertex Vertexes

buildG :: Int -> [Edge] -> Graph
buildG n = A.accumArray (flip S.insert) S.empty (1, n)

size :: Graph -> Int
size = snd . A.bounds

from :: Graph -> Vertex -> Vertexes
from g = (g A.!)

degree :: Graph -> Vertex -> Int
degree g = S.size . (g A.!)

readDirectedEdge :: B.ByteString -> [Edge]
readDirectedEdge = map (constructOneWay . map readInt . B.words) . B.lines

constructOneWay :: [Int] -> Edge
constructOneWay [s,t] = (s, t)
constructOneWay _ = undefined

readInt :: B.ByteString -> Int
readInt = fst . fromJust . B.readInt
