using System;
using System.IO;
using System.Linq;
using System.Collections.Generic;
using System.Text;

public class Program
{

    public void Proc()
    {
        long[] inpt = Reader.ReadLine().Split(' ').Select(a => long.Parse(a)).ToArray();
        this.MatiCount = (int)inpt[0];
        int roadCount = (int)inpt[1];
        this.StartMati = (int)inpt[2];
        this.GoalMati = (int)inpt[3];

        for (int i = 0; i < roadCount; i++) {
            inpt = Reader.ReadLine().Split(' ').Select(a => long.Parse(a)).ToArray();
            int matiA = (int)inpt[0];
            int matiB = (int)inpt[1];
            if(!roadYen.ContainsKey(matiA)) {
                roadYen.Add(matiA, new Dictionary<int, long>());
            }
            roadYen[matiA].Add(matiB, inpt[2]);
            if(!roadYen.ContainsKey(matiB)) {
                roadYen.Add(matiB, new Dictionary<int, long>());
            }
            roadYen[matiB].Add(matiA, inpt[2]);

            if (!roadSnook.ContainsKey(matiA)) {
                roadSnook.Add(matiA, new Dictionary<int, long>());
            }
            roadSnook[matiA].Add(matiB, inpt[3]);

            if(!roadSnook.ContainsKey(matiB)) {
                roadSnook.Add(matiB, new Dictionary<int, long>());
            }
            roadSnook[matiB].Add(matiA, inpt[3]);
        }

        CreateDic();

        List<long> ansList = new List<long>();
        long total = 0;
        for (int i = MatiCount; i >= 1; i--) {
            long costYen = dicYen[StartMati][i];
            long costSnook = dicSnook[GoalMati][i];
            long tmp = SyojiYen - costYen - costSnook;
            total = Math.Max(total, tmp);
            ansList.Add(total);
        }

        StringBuilder ans = new StringBuilder();
        for (int i = ansList.Count - 1; i >= 0; i--){
            ans.AppendLine(ansList[i].ToString());
        }
        Console.Write(ans.ToString());

    }

    private Dictionary<int, Dictionary<int, long>> roadYen = new Dictionary<int, Dictionary<int, long>>();
    private Dictionary<int, Dictionary<int, long>> roadSnook = new Dictionary<int, Dictionary<int, long>>();

    private Dictionary<int, Dictionary<int, long>> dicYen = new Dictionary<int, Dictionary<int, long>>();
    private Dictionary<int, Dictionary<int, long>> dicSnook = new Dictionary<int, Dictionary<int, long>>();

    private int MatiCount;
    private int StartMati;
    private int GoalMati;
    private long SyojiYen = 1000000000000000;


    private void CreateDic() {
        Queue<int> que = new Queue<int>();
        que.Enqueue(StartMati);
        Nullable<long>[] map = new Nullable<long>[this.MatiCount + 1];

        map[StartMati] = 0;
        while(que.Count>0) {
            int current = que.Dequeue();
            foreach(int next in roadYen[current].Keys) {
                if(map[next] != null && map[next].Value <= map[current].Value + roadYen[current][next]) {
                    continue;
                }
                que.Enqueue(next);
                map[next] = map[current].Value + roadYen[current][next];
            }
        }

        dicYen.Add(StartMati, new Dictionary<int, long>());
        for (int i = 1; i <= MatiCount; i++) {
            dicYen[StartMati].Add(i, map[i].Value);
        }

        que = new Queue<int>();
        que.Enqueue(StartMati);
        map = new Nullable<long>[this.MatiCount + 1];
        map[StartMati] = 0;
        while (que.Count > 0)
        {
            int current = que.Dequeue();
            foreach (int next in roadSnook[current].Keys)
            {
                if (map[next] != null && map[next].Value <= map[current].Value + roadSnook[current][next])
                {
                    continue;
                }
                que.Enqueue(next);
                map[next] = map[current].Value + roadSnook[current][next];
            }
        }

        dicSnook.Add(StartMati, new Dictionary<int, long>());
        for (int i = 1; i <= MatiCount; i++)
        {
            dicSnook[StartMati].Add(i, map[i].Value);
        }

    
        que = new Queue<int>();
        que.Enqueue(GoalMati);
        map = new Nullable<long>[this.MatiCount + 1];

        map[GoalMati] = 0;
        while (que.Count > 0)
        {
            int current = que.Dequeue();
            foreach (int next in roadYen[current].Keys)
            {
                if (map[next] != null && map[next].Value <= map[current].Value + roadYen[current][next])
                {
                    continue;
                }
                que.Enqueue(next);
                map[next] = map[current].Value + roadYen[current][next];
            }
        }

        dicYen.Add(GoalMati, new Dictionary<int, long>());
        for (int i = 1; i <= MatiCount; i++)
        {
            dicYen[GoalMati].Add(i, map[i].Value);
        }

        que = new Queue<int>();
        que.Enqueue(GoalMati);
        map = new Nullable<long>[this.MatiCount + 1];
        map[GoalMati] = 0;
        while (que.Count > 0)
        {
            int current = que.Dequeue();
            foreach (int next in roadSnook[current].Keys)
            {
                if (map[next] != null && map[next].Value <= map[current].Value + roadSnook[current][next])
                {
                    continue;
                }
                que.Enqueue(next);
                map[next] = map[current].Value + roadSnook[current][next];
            }
        }

        dicSnook.Add(GoalMati, new Dictionary<int, long>());
        for (int i = 1; i <= MatiCount; i++)
        {
            dicSnook[GoalMati].Add(i, map[i].Value);
        }
    
    }


    public class Reader
    {
        static StringReader sr;
        public static bool IsDebug = false;
        public static string ReadLine()
        {
            if (IsDebug)
            {
                if (sr == null)
                {
                    sr = new StringReader(InputText.Trim());
                }
                return sr.ReadLine();
            }
            else
            {
                return Console.ReadLine();
            }
        }
        private static string InputText = @"


8 12 3 8
2 8 685087149 857180777
6 7 298270585 209942236
2 4 346080035 234079976
2 5 131857300 22507157
4 8 30723332 173476334
2 6 480845267 448565596
1 4 181424400 548830121
4 5 57429995 195056405
7 8 160277628 479932440
1 6 475692952 203530153
3 5 336869679 160714712
2 7 389775999 199123879

";
    }

    public static void Main(string[] args)
    {
#if DEBUG
        Reader.IsDebug = true;
#endif
        Program prg = new Program();
        prg.Proc();
    }
}

Measured memory_bytes: 119492