n,t,*a=$<.read.split.map &:to_i s=a*'%s' class Integer;alias:-:*end (1<<~-n).times.any?{|i|p k=(~-n).times.map{|j|'+-'[i[j]]}.recerse;eval(s%k)==t&&$><<(k*'').tr(?-,?*)}