18/10/30 22:51:09.23 N8SwgYLQ.net
>>204
Python3
current = int(input())
total = int(input())
n_links = int(input())
assert 1 <= current <= total and n_links <= total
if current <= n_links//2:
seq = range(1, n_links+1)
elif current >= total-n_links//2:
seq = range(total-n_links+1, total+1)
else:
left = current - n_links//2
right = current + n_links//2 + (0 if n_links%2 == 0 else 1)
seq = range(left, right)
seq = ["[{}]".format(s) if s == current else str(s) for s in seq]
print(" ".join(seq))