' 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 New System.Text.StringBuilder()
        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.Append(w - rs(j).Item1)
            Else
                ans.Append(w - rs(rs.Count - 1).Item1)
            End If
            ans.Append(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 Heap(Of Tuple(Of Long, Integer))(n + 2, AddressOf cmpTp)
            For Each t As Tuple(Of Long, Integer) In g(p)
                ds(t.Item2) = t.Item1
                pq.Push(t)
            Next t
            Do While pq.Count > 0
                Dim e As Tuple(Of Long, Integer) = pq.Pop()
                If ds(e.Item2) > e.Item1 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.Push(New Tuple(Of Long, Integer)(t.Item1 + e.Item1, t.Item2))
                Next t
            Loop
        End Function
    End Class
    
    Function cmpTp(a As Tuple(Of Long, Integer), b As Tuple(Of Long, Integer)) As Integer
        If a.Item1 < b.Item1 Then
            cmpTp = 1
        ElseIf a.Item1 > b.Item1 Then
            cmpTp = -1
        Else
            cmpTp = a.Item2 - b.Item2
        End If
    End Function

	Class HItem(Of T)
		Public Index As Integer
		Public Value As T
	End Class
	
	Class Heap(Of T)
		Dim cmp As Comparison(Of T)
		Dim Items() As HItem(Of T)
		Dim _Count As Integer
		Public ReadOnly Property Count As Integer
			Get
				Return _Count
			End Get
		End Property
		Public Sub New(size As Integer, c As Comparison(Of T))
			ReDim Items(size): cmp = c
		End Sub
		Public Sub Beam(size As Integer)
			If _Count > size Then _Count = size
		End Sub
		Public Function Push(value As T) As HItem(Of T)
			Dim item As New HItem(Of T)()
			item.Index = _Count: item.Value = value
			Items(item.Index) = item: _Count += 1: GoUp(item.Index)
			Push = item
		End Function
		Public Function Pop() As T
			Dim item As HItem(Of T) = Items(0): _Count -= 1
			Items(0) = Items(_Count): Items(0).Index = 0
			Items(_Count) = Nothing: GoDown(0)
			Pop = item.Value
		End Function
		Public Function Update(item As HItem(Of T), newValue As T) As HItem(Of T)
			item = Items(item.Index)
			Dim oldValue As T = item.Value
			item.Value = newValue
			If cmp(oldValue, newValue) < 0 Then
				GoDown(item.Index)
			Else
				GoUp(item.Index)
			End IF
			Update = item
		End Function
		Public Function Delete(item As HItem(Of T)) As T
			item = Items(item.Index)
			Dim Index As Integer = item.Index: _Count -= 1
			Items(Index) = Items(_Count): Items(Index).Index = Index
			Items(_Count) = Nothing: GoDown(Index)
			Delete = item.Value
		End Function
		Private Sub GoUp(i As Integer)
			Do Until i = 0
				Dim p As Integer = (i - 1) >> 1
				If cmp(Items(i).Value, Items(p).Value) >= 0 Then Exit Do
				Dim item As HItem(Of T) = Items(i)
				Items(i) = Items(p): Items(p) = item
				Items(i).Index = i: Items(p).Index = p
				i = p
			Loop
		End Sub
		Private Sub GoDown(i As Integer)
			Dim c As Integer = (i << 1) + 1
			Do While c < _Count
				If c + 1 < _Count _
					AndAlso cmp(Items(c + 1).Value, Items(c).Value) < 0 Then c += 1
				If cmp(Items(i).Value, Items(c).Value) <= 0 Then Exit Do
				Dim item As HItem(Of T) = Items(i)
				Items(i) = Items(c): Items(c) = item
				Items(i).Index = i: Items(c).Index = c
				i = c: c = (i << 1) + 1
			Loop
		End Sub
	End Class
End Module