import java.util.;
import java.io.;
public class Main{
public static void main(String[] args)throws Exception{
BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
int n = Integer.parseInt(br.readLine());
String[] numStr = br.readLine().split(” “);
int[] nums = new int[n];
for(int i = 0;i < n;i++){
nums[i] = Integer.parseInt(numStr[i]);
}
quickSort(nums,0,n - 1);
deleteNums(nums);
}
public static void quickSort(int[] nums,int l,int r){
int i = l - 1,j = r + 1;
int mid = nums[i + (j - i) / 2];
if(l < r){
while(i < j){
do{
i++;
}while(nums[i] < mid);
do{
j--;
}while(nums[j] > mid);
if(i < j){
int num = nums[i];
nums[i] = nums[j];
nums[j] = num;
}
}
quickSort(nums,l,j);
quickSort(nums,j + 1,r);
}
}
public static void deleteNums(int[] nums){
int left = 0,right = 1;
while(right < nums.length){
if(nums[right] != nums[left]){
left++;
nums[left] = nums[right];
}
right++;
}
for(int i = 0;i < left + 1;i++){
System.out.print(nums[i] + " ");
}
}
}