Help me in solving MAKEDIV3 problem

My issue

I am using python3 to solve the problem, I generated the number starting with ‘3’ and ending with ‘3’ and ‘0’ in between if the digit is greater than 2 digit number(n>2) but I am always getting run time error. Please help me out to figure out the flaw and correct it. The code is as followed
t = int(input())

for _ in range(t):
n = int(input())
s = “”

for i in range(n):
    if i == 0 or i == n-1:
        s += '3'
    else:
        s += '0'
        
print(int(s))

My code

t = int(input())

for _ in range(t):
    n = int(input())
    s = ""
    
    for i in range(n):
        if i == 0 or i == n-1:
            s += '3'
        else:
            s += '0'
            
    print(int(s))
        

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

@coding_noob11
here plzz refer my c++ code for better understanding of the logic

#include <iostream>
using namespace std;

int main() {
	// your code goes here
	int t;
	cin>>t;
	while(t--)
	{
	    int n;
	    cin>>n;
	    for(int i=0;i<n-1;i++)
	    cout<<9;
	    cout<<3;
	    cout<<endl;
	}
	return 0;
}