      PROGRAM goToSchool
      IMPLICIT NONE
      INTEGER :: N
      INTEGER,ALLOCATABLE :: A(:),ans(:),iniA(:)
      
      INTEGER :: i, buffer, in ,out
      LOGICAL :: flag
      
      
      READ*,N
      ALLOCATE( A(N),ans(N),iniA(N) )
      READ*,A(:)
      iniA(:) = A(:)
      
      ans = (/ (i, i = 1,N) /)
      
      
      outer:DO while( .true. )
      flag = .true.
        DO i = 1,N-1
          IF( A(i)>A(i+1) )THEN
            buffer = A(i+1)
            A(i+1) = A(i)
            A(i)   = buffer
            
            flag = .false.
          END IF
        END DO
        IF(flag) EXIT outer
      END DO outer
      
      
      DO out = 1,N
        DO in = 1,N
          IF( A(out)==iniA(in) )THEN
            ans(out) = in
          END IF
        END DO
      END DO
      
      
      
      
      print*,ans(:)
      
      
      END PROGRAM