def ShowNumber(N, Original, K, flag):
#To print the number
print(N, end = " ")
# change flag if the number becomes negative
if (N <= 0):
if(flag==0):
flag = 1
else:
flag = 0
# base condition for second_case (Adding K)
if (N == Original and (not(flag))):
return
# if flag == true, we subtract value until the number is greater then zero
if (flag == True):
ShowNumber(N - K, Original, K, flag)
return
# second case (Addition )
if (not(flag)):
ShowNumber(N + K, Original, K, flag);
return
N = 20
K = 6
ShowNumber(N, N, K, True)