Help me in solving MAKEDIV3 problem

My issue

i got the approach right but i guess the test cases are wrong can you guys please check it

My code

n=int(input())
for i in range (n):
    n1=int(input())
    a=(10**(n1-1))
    b=(10**n1)
    for j in range(a,b):
        if(j%3==0 and j%9!=0 and j%2!=0):
            print(j)
            break
        
    

Learning course: Jump from 2* to 3*
Problem Link: Make it Divisible Practice Problem in Jump from 2* to 3* - CodeChef

Test cases are not wrong for sure, we can’t store this long number 10^(10^4) at least not in cpp or Java, on that, this is an observation problem! There are multiple answers other than written in expected.

Bro correct code is : -

by defining function method we solve it

def solution():
n = int(input())
if(n==1):
print(“3”)
elif n==2:
print(“33”)
else:
st = “0”*(n-2)
print(“3”+st+“3”)

t = int(input())
while(t>0):
t = t-1
solution()