while true begin x = gets.split rescue break end n = x[0].to_i s = x[1].to_i if n*9>=s if s%9==0 puts s/9*"9" + (n-(s/9))*"0" else puts s/9*"9" + str(s%9) + (n-(s/9+1))*"0" end else puts "-" end end