// {{{ by unolight
#include <bits/stdc++.h>
#include <unistd.h>
#pragma GCC diagnostic ignored "-Wunused-result"
#pragma GCC diagnostic ignored "-Wunused-function"
#define SZ(x) ((int)(x).size())
#define ALL(x) begin(x),end(x)
#define RALL(x) rbegin(x),rend(x)
#define REP(i,n) for ( int i=0; i<int(n); i++ )
#define REP1(i,a,b) for ( int i=(a); i<=int(b); i++ )
#define MP make_pair
#define PB push_back
using namespace std;
typedef int64_t LL;
typedef pair<int,int> PII;
typedef vector<int> VI;

namespace { namespace unolight {
// Read Input
template<class T> void _R( T &x ) { cin>>x; }
void _R( int &x ) { scanf("%d",&x); }
void _R( int64_t &x ) { scanf("%" PRId64,&x); }
void _R( double &x ) { scanf("%lf",&x); }
void _R( char &x ) { scanf(" %c",&x); }
void _R( char *x ) { scanf("%s",x); }
void R() {}
template<class T, class... U> void R( T& head, U&... tail ) { _R(head); R(tail...); }
// Write Output
template<class T> void _W( const T &x ) { cout<<x; }
void _W( const int &x ) { printf("%d",x); }
void _W( const int64_t &x ) { printf("%" PRId64,x); }
void _W( const double &x ) { printf("%.16f\n",x); }
void _W( const char &x ) { putchar(x); }
void _W( const char *x ) { printf("%s",x); }
template<class T> void _W( const vector<T> &x ) { for (auto i = x.begin(); i != x.end(); _W(*i++)) if (i != x.cbegin()) putchar(' '); }
void W() {}
template<class T, class... U> void W( const T& head, const U&... tail ) { _W(head); putchar(sizeof...(tail)?' ':'\n'); W(tail...); }

#ifdef UNOLIGHT
#include "dump.hpp"
#else
#define dump(...)
#endif

template<class T> inline bool chmax( T &a, const T &b ) { return b>a ? a=b,true : false; }
template<class T> inline bool chmin( T &a, const T &b ) { return b<a ? a=b,true : false; }
template<class T> using MaxHeap = priority_queue<T>;
template<class T> using MinHeap = priority_queue<T, vector<T>, greater<T>>;
template<class T, class F=less<T>> void sort_uniq( vector<T> &v, F f=F() ) {
    sort(begin(v),end(v),f);
    v.resize(unique(begin(v),end(v))-begin(v));
}
// }}}

template <class T>
using Graph = vector<vector<T>>;

// {{{ Dijkstra
template<class T, T INF>
struct Dijkstra {
    vector<T> res; // res[i]: shortest distance from s to i
    
    template<class E>
    Dijkstra(const Graph<E> &g, int s) {
        int n = (int)g.size();
        res = vector<T>(n, INF);
        
        using P = pair<T, int>; // (distance, node)
        priority_queue<P, vector<P>, greater<P>> q;
        q.push(P(0, s));
        res[s] = 0;
        while (!q.empty()) {
            P p = q.top(); q.pop();
            if (res[p.second] < p.first) continue;
            for (E e: g[p.second]) {
                if (p.first+e.cost < res[e.to]) {
                    res[e.to] = p.first+e.cost;
                    q.push(P(res[e.to], e.to));
                }
            }
        }
    }
};

struct Edge { LL to, cost; };

const LL INF=1e18;
Graph<Edge> g1; // yen s->
Graph<Edge> g2; // snuuk t->

void add_edge( Graph<Edge> &g, int u, int v, LL cost ) {
    g[u].push_back({v,cost});
    g[v].push_back({u,cost});
}
// }}}

void main() {
    int n,m,s,t;
    R(n,m,s,t);
    --s; --t;
    g1.resize(n);
    g2.resize(n);
    REP(i,m) {
        int u,v,a,b;
        R(u,v,a,b);
        --u; --v;
        add_edge(g1,u,v,a);
        add_edge(g2,u,v,b);
    }
    auto v1 =  Dijkstra<LL, INF>(g1,s).res;
    auto v2 =  Dijkstra<LL, INF>(g2,t).res;
    REP(i,n) v1[i]+=v2[i];
    MinHeap<pair<LL,int>> q;
    REP(i,n) q.emplace(v1[i],i);
    LL tot=1e15;
    REP(i,n) {
        while ( SZ(q) && q.top().second<i ) q.pop();
        auto p=q.top();
        W(tot-p.first);
    }
}

}} // {{{ main
int main() { unolight::main(); return 0; }
// }}}

Measured memory_bytes: 22672