main = do
    c <- getContents
    let i = Prelude.map (Prelude.map read) $ Prelude.map words $ lines c :: [[Int]]
        o = ans i
    mapM_ putStrLn $ Prelude.map unwords $ Prelude.map (Prelude.map show) o
main = do
    c <- getContents
    let i = Prelude.map (Prelude.map read) $ Prelude.map words $ lines c :: [[Int]]
        o = ans i
    mapM_ putStrLn $ Prelude.map unwords $ Prelude.map (Prelude.map show) o
main = do
    c <- getContents
    let i = Prelude.map (Prelude.map read) $ Prelude.map words $ lines c :: [[Int]]
        o = ans i
    mapM_ putStrLn $ Prelude.map unwords $ Prelude.map (Prelude.map show) o