Help me in solving MAKEDIV3 problem

My issue

whats wrong in my code?

My code

#include <iostream>
#include <climits>
using namespace std;

int main() {
	int z;
	cin>>z;
	for(int i=0;i<z;i++){
	    int n;
	    cin>>n;
	    
	    int a=((n-1)*10);
	    
	    
	    
	    
	    for(int i=a;i<INT_MAX;i++){
	        
	        if(i%3==0 && i%9!=0){
	            cout<<i<<endl;
	            break;
	        }
	    }
	    
	    
	    
	}
	return 0;
}

Learning course: Jump from 2* to 3*
Problem Link: CodeChef: Practical coding for everyone