You are given a permutation of size . For each , print the number of indices , which when removed, decreases the maximum possible length of an increasing subsequence that contains index .
输入格式
The first line contains an integer . ().
The next line contains integers denoting the permutation. (, all s are distinct).
输出格式
Print integers, separated by spaces, denoting the answers for .