main = do
  _ <- getLine
  c <- getContents
  let i = map words $ lines c
      o = ans i
  mapM_ print o
main = do
  _ <- getLine
  c <- getContents
  let i = map words $ lines c
      o = ans i
  mapM_ print o
main = do
  _ <- getLine
  c <- getContents
  let i = map words $ lines c
      o = ans i
  mapM_ print o