func main() var n: int :: cui@inputInt() var a: []int :: #[n]int for i(0, n - 1) do a[i] :: cui@inputInt() end for var nums: []int :: #[a[0]]int for i(0, n - 1) do nums[a[i] - 1] :+ 1 end for for i(a[0] - 1, 1, -1) do nums[i - 1] :+ nums[i] end for do cui@print("\{nums.join(" ")}\n") end func