#include <iostream>
using namespace std;
int main()
{
int n, s, f=0, d=1;
cin>>n>>s;
while(n-1){
d*=10;
n--;
}
for(int i=d;i<d*10;i++){
int suma_cifrelor = 0;
int n_copy = i;
while(n_copy){
suma_cifrelor += n_copy % 10;
n_copy /= 10;
}
if(suma_cifrelor == s){
cout<<i<<" ";
f++;
}
}
if(f==0) cout<<"NU EXISTA";
}