Codeforces 221A - A. Little Elephant and Function

221A - A. Little Elephant and Function

calc :: Int -> [Int]
calc 1 = [1]
calc 2 = [2, 1]
calc n = [n, 1] ++ [2..n-1]

main = do s <- getLine
          putStrLn $ unwords $ map show $ calc $ read s