import java.io.BufferedWriter; import java.io.FileInputStream; import java.io.FileWriter; import java.io.IOException; import java.io.InputStreamReader; import java.io.PrintWriter; import java.util.Arrays; import java.util.BitSet; import java.util.HashMap; public class Main { public static void main(String[] args) throws NumberFormatException, IOException {Solve solve = new Solve();solve.solve();} } class Solve{ void dump(int[]a){for(int i=0;in){ System.out.println(-1); return; } BitSet[][] dp = new BitSet[k+1][d+1]; dp[0][0] = new BitSet(n); for(int i=n-1; i>=0; i--){ final int v = i+1; for(int j=k-1; j>=0; j--){ for(int l=0; l<=d-v; l++){ if(dp[j][l]==null) continue; dp[j+1][l+v] = (BitSet) dp[j][l].clone(); dp[j+1][l+v].set(v); } } } if(dp[k][d]==null) System.out.println(-1); else{ StringBuilder sb = new StringBuilder(); BitSet bs = dp[k][d]; for(int i=bs.nextSetBit(0); i!=-1; i=bs.nextSetBit(i+1)){ sb.append(i+" "); } System.out.println(sb.toString().trim()); } } } class MultiSet extends HashMap{ @Override public Integer get(Object key){return containsKey(key)?super.get(key):0;} public void add(T key,int v){put(key,get(key)+v);} public void add(T key){put(key,get(key)+1);} public void sub(T key) {final int v=get(key);if(v==1)remove(key);else put(key,v-1);} } class Timer{ long time; public void set(){time=System.currentTimeMillis();} public long stop(){return time=System.currentTimeMillis()-time;} public void print() {System.out.println("Time: "+(System.currentTimeMillis()-time)+"ms");} @Override public String toString(){return"Time: "+time+"ms";} } class Writer extends PrintWriter{ public Writer(String filename)throws IOException {super(new BufferedWriter(new FileWriter(filename)));} public Writer()throws IOException{super(System.out);} } class ContestScanner { private InputStreamReader in;private int c=-2; public ContestScanner()throws IOException {in=new InputStreamReader(System.in);} public ContestScanner(String filename)throws IOException {in=new InputStreamReader(new FileInputStream(filename));} public String nextToken()throws IOException { StringBuilder sb=new StringBuilder(); while((c=in.read())!=-1&&Character.isWhitespace(c)); while(c!=-1&&!Character.isWhitespace(c)){sb.append((char)c);c=in.read();} return sb.toString(); } public String readLine()throws IOException{ StringBuilder sb=new StringBuilder();if(c==-2)c=in.read(); while(c!=-1&&c!='\n'&&c!='\r'){sb.append((char)c);c=in.read();} return sb.toString(); } public long nextLong()throws IOException,NumberFormatException {return Long.parseLong(nextToken());} public int nextInt()throws NumberFormatException,IOException {return(int)nextLong();} public double nextDouble()throws NumberFormatException,IOException {return Double.parseDouble(nextToken());} }