import Data.List
import Data.Maybe

readInt :: String -> Int
readInt = read

main = do
 s <- map readInt.words<$>getContents
 putStrLn.unlines.map show $ solve s

solve::[Int]->[Int]
solve (n:s)
 | any (< 0) (shibaku n s) = [0-1]
 | any (<= 0) (create n s) = [0-1]
 | otherwise = reverse $ create n s

create :: Int -> [Int] -> [Int]
create 0 _ = []
create n s = [(maxIndex n s) + 1] ++ create (n-1) (delIx (maxIndex n s) s)

maxIndex::Int->[Int]->Int
maxIndex n s = if null ic then (0-2) else maximum ic where
 ic = findIndices (==0) (shibaku n s)

delIx:: Int->[Int]->[Int]
delIx n s = take n s ++ drop (n+1) s

shibaku n s = zipWith (-) [1..n] s
