import java.util.Scanner;
public class Main{
public static void main(String[] args){
Scanner sc = new Scanner(System.in);
final int N = sc.nextInt();
int[] scores = new int[N];
for(int i = 0; i < N; i++){
scores[i] = sc.nextInt();
}
sc.close();
int max = scores[0];
int min = scores[0];
for(int i = 1; i< N; i++){
if(max < scores[i]){
max = scores[i];
}
if(min > scores[i]){
min = scores[i];
}
}
// System.out.println(max);
// System.out.println(min);
// X = 40 * (n - 3) / (max - min) + 60;
for(int i = 0; i < N; i++){
scores[i] = (int)(1.0*(scores[i] - min) / (max - min) * 40 + 60);
}
for (int i : scores){
System.out.print(scores[i] + " ");
}
}
}