output_description: If a+b=15, print `+`; if a\times b=15, print `*`; if neither holds, print `x`.
  
  * * *
input_description: Input is given from Standard Input in the following format:
  
      
      
      a b
attempt: from heapq import *
  import numpy as np
  
  
  class vertex:
      def __init__(self):
          self.list_adj = []  # list of [no_adjnode, a, b]
  
      def add_edge(self, adj):
          self.list_adj.append(adj)
  
  
  n, m, s, t = map(int, input().split())
  # zero start
  s -= 1
  t -= 1
  
  #
  vertices = []
  for i in range(n):
      v = vertex()
      vertices.append(v)
  
  print(n, m, s, t)
  # load node
  for k in range(m):
      u, v, a, b = map(int, input().split())
      vertices[u - 1].add_edge([v - 1, a, b])
      vertices[v - 1].add_edge([u - 1, a, b])
  
  
  # print('-----------------')
  
  # print(n, m, s, t)
  # for i in range(n):
  #    print(vertices[i].list_adj)
  
  mode = 0
  
  
  # return list of [no_adj, cost]
  def get_adj(v):
      res = []
      for adj in v.list_adj:
          res.append([adj[0], adj[1 + mode]])
      return res
  
  
  # print('show adjcent(a)')
  # for k in range(n):
  #    print(get_adj(vertices[k]))
  
  mode = 1
  # print('show adjcent(b)')
  # for k in range(n):
  #    print(get_adj(vertices[k]))
  
  
  def dijkstra(s):
      inf = int(10e20)
      dist = [inf] * n
      h = []
      heappush(h, (0, s))
      while len(h) > 0:
          # pop 1 node
          dv, v = heappop(h)
          # if already decided, continue
          if dist[v] < inf:
              continue
          dist[v] = dv
          # push adjcent node
          list_adj = get_adj(vertices[v])
          for adj in list_adj:
              if dist[adj[0]] == inf:
                  heappush(h, (dv + adj[1], adj[0]))
                  pass
          pass
      return dist
  
  
  mode = 0
  dist_a = dijkstra(s)
  mode = 1
  dist_b = dijkstra(t)
  # cost = []
  # for k in range(len(dist_a)):
  #    cost.append(dist_a[k] + dist_b[k])
  cost = np.array(dist_a, dtype="int") + np.array(dist_b, dtype="int")
  cost = np.array(cost, dtype="int")
  # print(cost)
  
  m0 = int(10e15)
  for i in range(n):
      cost_available = cost[i:]
      print(m0 - np.amin(cost_available))
  
problem_description: Statement
  
  You are given two integers a and b. Determine if a+b=15 or a\times b=15 or
  neither holds.
  
  Note that a+b=15 and a\times b=15 do not hold at the same time.
samples: [{"input": "4 11", "output": "+\n    \n\n4+11=15.\n\n* * *"}, {"input": "3 5", "output": "*\n    \n\n3\\times 5=15.\n\n* * *"}, {"input": "1 1", "output": "x\n    \n\n1+1=2 and 1\\times 1=1, neither of which is 15."}]