Could anyone pls point why the submission is not right

#include <stdio.h>

int main(void) {
// your code goes here

int t,n;
scanf("%d",&t);
while(t--){
    scanf("%d",&n);
    if(n>3){printf("%d ",n);
    printf("%d ",n-2);
    for(int i = 3;i<n-1;i++){
        printf("%d ",i);
    }
    printf("%d ",n-3);
    printf("%d ",n-1);
    printf("\n");}
    else{
        printf("3 2 1");
    }
    
}

return 0;

}

question-> AVGPERM Problem - CodeChef

can you please provide me a question bro

I believe your code will print ‘n-2’ twice when n >= 5: once on line 6 and once on line 8
When this happens your solution doesn’t correspond to a permutation on {1,2,3,…,N}