solve3 list = loop list
  where
    loop [] = return ()
    loop ([n]:dataSet:dataSets) = do
      let m = (sum dataSet) / n :: Double
          sigma = sqrt . (/n) .  foldr ((+) . (\s -> (s-m)**2)) 0 $ dataSet

      print sigma
      loop dataSets

main = do
  dataSet <- fmap (init . map (map read) . map words . lines) getContents :: IO [[Double]]
  solve3 dataSet
