type Score =Double

main :: IO()
main = getContents >>= putOut.formatOut.solve.formatIn
  where putOut s | null s || last s == '\n' = putStr s
                 | otherwise                = putStrLn s
   
formatIn :: String -> [[Score]]
formatIn = map (map read.words).f.lines
    where f []       = []
          f (_:[])   = []
          f ("0":_)  = []
          f (_:x:xs) = x : f xs 

formatOut :: [Double] -> String
formatOut = unlines.map (show.(/100000).realToFrac.floor.(*100000))
 
solve :: [[Score]] -> [Double]
solve xs = map (sqrt.disp) xs

disp :: [Score] -> Double
disp x =  (/n).sum $map (\y -> (y-m)^2) x
    where n = realToFrac $length x
          m = (/n).realToFrac $sum x