import           Control.Applicative
import           Data.List

split :: [[Double]] -> [(Double, [Double])]
split xss = unfoldr f xss
  where
    f []          = Nothing
    f [_]         = Nothing
    f (as:bs:css) = Just ((head as, bs), css)

sd :: (Double, [Double]) -> Double
sd (n, ds) = sqrt $ (sum $ fmap (\d -> (d - m) ^ 2) ds) / n
  where
    m = sum ds / n

main :: IO ()
main = do
    xss <- fmap (fmap read . words) . lines <$> getContents :: IO [[Double]]
    let answer = fmap sd $ split xss
    mapM_ print answer

