import java.util.*; public class Main { public static void main (String[] args) throws Exception { Scanner sc = new Scanner(System.in); int n = sc.nextInt(); int order = 1; int score = sc.nextInt(); StringBuilder sb = new StringBuilder(); sb.append(order).append("\n"); for (int i = 0; i < n - 1; i++) { if (score < sc.nextInt()) { order++; } sb.append(order).append("\n"); } System.out.print(sb); } }