import java.util.ArrayList;
import java.util.Collections;
import java.util.Scanner;

public class Main{
    public static void main(String[] args){
        Scanner sc = new Scanner(System.in);
        final int N = sc.nextInt();
        ArrayList<Integer> scores = new ArrayList<>();
        
        for(int i = 0; i < N; i++){
            scores.add(sc.nextInt());
        }
        
        int max = Collections.max(scores);
        int min = Collections.min(scores);
        
        
        // X = 40 * (n - 3) / (max - min) + 60;
        for(int i = 0; i < N; i++){
            scores.set(i, (int)(1.0*(scores.get(i) - min) / (max - min) * 40 + 60));
        }
        for (int i : scores){
            System.out.print(i + " ");
        }
    }
}