N, M, K = gets.split.map(&:to_i) tail = [*0..N - 2] S = M - tail.sum tail.push(S) top = [] k = K while k > 0 && tail.size > 0 l = tail.size v = tail.pop if k >= l - 1 k -= (l - 1) top.push(v) else tail.insert(-(k + 1), v) break end end puts (top + tail)