import qualified Data.Vector.Unboxed as VU
import qualified Data.Vector.Unboxed.Mutable as VUM
import qualified Data.Map as MP
import qualified Data.Sequence as SQ
import Data.Tuple
import Data.List
import Control.Monad

type Distance = VUM.IOVector Int
type Table = VUM.IOVector Int
type Deque = SQ.Seq Int

bfs :: Distance -> MP.Map Int [Int] -> Deque -> IO Distance
bfs distance graph dq = 
  case SQ.viewl dq of
    SQ.EmptyL -> return distance
    x SQ.:< dq' -> do
      VUM.read distance x >>= \rx -> do
        let Just ys = MP.lookup x graph
        ys' <- flip filterM ys $ \y -> do
          VUM.read distance y >>= \ry ->
            if (ry /= 10^9)
               then return False
               else (VUM.write distance y $ rx+1) >> return True
        let dq'' = foldl (SQ.|>) dq' ys'
        bfs distance graph dq''

main = do
  [n,a,b] <- map read . words <$> getLine :: IO [Int]
  let vs = let xs = zip [1..n] [2..n] in [(a,b),(b,a)] ++ (map swap xs) ++ xs :: [(Int, Int)]
  let graph = foldl (\m k -> MP.insert k [] m) MP.empty [1..n]
  let graph' = foldl (\m (f,t) -> MP.adjust (t:) f m) graph vs
  
  table <- VUM.replicate (n+1) 0 :: IO Table

  forM_ [1..n] $ \i -> do
    distance <- VUM.replicate (n+1) (10^9) :: IO Distance
    VUM.write distance i 0    
    bfs distance graph' (SQ.singleton i)
    distance' <- VU.tail . VU.zip (VU.fromList [0..n]) <$> VU.unsafeFreeze distance

    VU.forM_ distance' $ \(j,d) -> do
      when (j > i) $ do
        VUM.modify table (+1) d

  table' <- VU.tail . VU.init <$> VU.unsafeFreeze table    
  VU.mapM_ print table'