#include <stdio.h>

int main() {
    int N;
    scanf("%d", &N);
    int V[N], R[12], Maior=0;

    for(int i=0; i<12; i++){
        R[i]=0;
    }
    
    for(int i=0; i<N; i++){
        scanf("%d", &V[i]);
    }
    
    for(int i=0; i<N; i++){
        R[V[i]-1]++;
    }
    
    for(int i=0; i<12; i++){
        for(int j=0; j<12; j++){
            if(R[i]>=R[j]){
                Maior++;
            }
        }
        if(Maior==12){
            printf("%d ", i+1);
            }
        Maior=0;
    }
    return 0;
}

Embed on website

To embed this project on your website, copy the following code and paste it into your website's HTML: