' AtCoder My Practice
' author: Leonardone @ NEETSDKASU
Option Explicit On
Option Strict   On
Option Compare  Binary
Option Infer    On
Imports System.Collections.Generic

Module Main

    Sub Main
        Try
            Solve()
        Catch Ex As Exception
            Console.Error.WriteLine(ex)
        End Try
        Console.Out.Flush()
    End Sub

    Dim ps() As Long
    Dim rs As New List(Of Tuple(Of Long, Integer))()

    Sub Solve
        Dim toks() As String = Console.ReadLine().Split(" "c)
        Dim n As Integer = CInt(toks(0))
        Dim m As Integer = CInt(toks(1))
        Dim s As Integer = CInt(toks(2))
        Dim t As Integer = CInt(toks(3))
        Dim g1 As New Graph(n)
        Dim g2 As New Graph(n)
        For i As Integer = 1 To m
            toks = Console.ReadLine().Split(" "c)
            Dim u As Integer = CInt(toks(0))
            Dim v As Integer = CInt(toks(1))
            Dim a As Integer = CInt(toks(2))
            Dim b As Integer = CInt(toks(3))
            g1.AddUD(u, v, a)
            g2.AddUD(u, v, b)
        Next i
        ps = g1.Dijkstra(s)
        g2.Dijkstra(t, AddressOf Foo)
        rs.Sort()
        Dim j As Integer = 0
        Dim w As Long = CLng(1e15)
        Dim ans As String = ""
        For i As Integer = 1 To n
            Do While j < rs.Count AndAlso rs(j).Item2 < i
                j += 1
            Loop
            If j < rs.Count Then
                ans += (w - rs(j).Item1).ToString()
            Else
                ans += (w - rs(rs.Count - 1).Item1).ToString()
            End If
            ans += vbNewLine
        Next i
        Console.Write(ans)
    End Sub

    Sub Foo(e As Tuple(Of Long, Integer))
        If ps(e.Item2) < Long.MaxValue Then
            rs.Add(New Tuple(Of Long, Integer)(ps(e.Item2) + e.Item1, e.Item2))
        End If
    End Sub

    Class Graph
        Public ReadOnly n As Integer
        Public ReadOnly g() As List(Of Tuple(Of Long, Integer))
        Sub New(n As Integer)
            Me.n = n
            ReDim g(n)
            For i As Integer = 0 To UBound(g)
                g(i) = New List(Of Tuple(Of Long, Integer))()
            Next i
        End Sub
        Sub AddUD(x As Integer, y As Integer, c As Long)
            g(x).Add(New Tuple(Of Long, Integer)(c, y))
            g(y).Add(new Tuple(Of Long, Integer)(c, x))
        End Sub
        Delegate Sub Caller(e As Tuple(Of Long, Integer))
        Sub Emp(e As Tuple(Of Long, Integer))
        End Sub
        Function Dijkstra(p As Integer, Optional fn As Caller = Nothing) As Long()
            If fn Is Nothing Then fn = New Caller(AddressOf Emp)
            Dim ds(n) As Long
            Dijkstra = ds
            For i As Integer = 0 To UBound(ds)
                ds(i) = Long.MaxValue
            Next i
            ds(p) = 0
            fn(New Tuple(Of Long, Integer)(0, p))
            Dim pq As New SortedSet(Of Tuple(Of Long, Integer))()
            For Each t As Tuple(Of Long, Integer) In g(p)
                ds(t.Item2) = t.Item1
                pq.Add(t)
            Next t
            Do While pq.Count > 0
                Dim e As Tuple(Of Long, Integer) = Nothing
                For Each t As Tuple(Of Long, Integer) In pq
                    e = t
                    Exit For
                Next t
                pq.Remove(e)
                If e.Item1 > ds(e.Item2) Then Continue Do
                fn(e)
                For Each t As Tuple(Of Long, Integer) In g(e.Item2)
                    If ds(t.Item2) <= t.Item1 + e.Item1 Then
                        Continue For
                    End If
                    ds(t.Item2) = t.Item1 + e.Item1
                    pq.Add(New Tuple(Of Long, Integer)(t.Item1 + e.Item1, t.Item2))
                Next t
            Loop
        End Function
    End Class

End Module