Python 2.x (197 212), Python 3.x (182 212 200277)
Related question, related answer. Gives the answer and an error if there is one, else prints "NO SOLUTION".
Python 2.x Version:
fromimport re,itertools importas *I
a=raw_inpute=eval;a=raw_input().split();c=1;b=len(a)
for i in I.product('123456789',repeat=b):
if eval(''d=''.join(sum(zip([j+'.'for j in i],a),()))[:3*b-1]
if e(d)==int(a[-1]):print' '.join(i);c=0
print"NO SOLUTION"*c
Python 3.x Version: I don't run Python 3.x, so this may give errors.
from itertools importand *
a=raw_input().splitall();c=1;b=len[e(an)
%1==0 for in in product('123456789',repeat=b):
if eval(''re.join(sum(zipfindall(i,a)'\d./\d.',()))[:3*b-1]d)==int(a[-1]]):print('print' '.join(i));c=0
print("NOprint"NO SOLUTION"*c)