N, M, K = gets.split.map(&:to_i) tail = [*1..N - 1] 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, v) break end end puts (top + tail)