PROGRAM KOMBINATIONEN(INPUT,OUTPUT);

  VAR   K,N: INTEGER;
        Z: ARRAY[1..9] OF INTEGER;

  PROCEDURE PRINT;
    VAR I: INTEGER;
    BEGIN
        FOR I := 1 TO K DO WRITE(Z[I]:1); WRITE(" ":2)
    END;


  PROCEDURE KOMBI(N,K: INTEGER);
    VAR I: INTEGER;
    BEGIN
        IF K>0 THEN FOR I:= K TO N DO
                            BEGIN  Z[K] := I; KOMBI(I-1,K-1)  END
               ELSE PRINT
    END;


BEGIN
        READ(N,K);
        KOMBI(N,K)
END.
