import java.util.Arrays; import java.util.LinkedList; import java.util.Scanner; public class Main { public static long MOD = 1000000007; public static void main(String[] args) { Scanner sc = new Scanner(System.in); final int N = sc.nextInt(); final int K = sc.nextInt(); final int force = N - K; int lower = 1, upper = 100000000; int[] answers = new int[N]; for(int f = 0; f < force; f++){ if(f % 2 == 0){ answers[f] = lower++; }else{ answers[f] = upper--; } } //System.out.println(Arrays.toString(answers)); for(int i = force; i < N; i++){ answers[i] = answers[i - 1]; } //System.out.println(Arrays.toString(answers)); for(int i = 0; i < N; i++){ System.out.print((i == 0 ? "" : " ") + answers[i]); } System.out.println(); } }