#include<bits/stdc++.h>
using namespace std;
unordered_set <int> s;
int a[10]={3, 5, 7, 3, 3, 13, 5, 13, 29, 13};
void shift(int i){
    do{
         
        a[i]=a[i+1];
        i++;
         
    }while(i!=10);
}
int main(){
    int tot=0;
    for(int i=0;i<10-tot;i++){
        if(s.find(a[i])!=s.end()){
            tot++;
            shift(i);
            i--;
            
        }
        else{
            s.insert(a[i]);
        }
    }
     
    //printing
    for(int j=0;j<10-tot;j++){
        printf("%d ",a[j]);
    }
     
     
     
     
     
     
     
     
     
    return 0;
}