import Data.List
import Data.List.Split
import Control.Arrow
main = mapM_ (putStrLn . solve) . chunksOf 2 . map (map read .words) . lines =<< getContents
solve [[n],as]
  |(any (\(x,y)->x+1/=y) . zip ds $ tail ds) = i
  |(any (<2) $ tail cs) = i
  |head ds-head cs+2/=length ds = i
  |otherwise = p
  where (ds,cs) = (map head &&& map length) . group . sort $ as
p = "Possible";
i = "Impossible";