#include using namespace std; bool check(int m,int n,int d,int k){ if(d==0&&k==0) return true; if((d|k)==0) return false; int mi=0,ma=0; for(int i=0;i>n>>d>>k; bool first=false; if(check(1,n,d,k)){ for(int i=1;i<=n;i++){ if(check(i+1,n,d-i,k-1)){ d-=i; k--; if(first) cout<<" "; else first=true; cout<