Buggy python submission (verdict: Runtime Error):
n = input()
for i in range(1,n+1):
    if(i%3==0):
        print('%d'%(i) )


Fixed submission:
n = int(input())
print(" ",end="")
print(*[i for i in range(1,1+n) if i%3==0 or'3' in str(i)])

Buggy python submission (verdict: Runtime Error):
n = input()
for i in range(1,n+1):
    if(i%3==0):
        print('%d'%(i),end=" ")


Fixed submission:
n = int(input())
print(" ",end="")
print(*[i for i in range(1,1+n) if i%3==0 or'3' in str(i)])

Buggy python submission (verdict: Runtime Error):
n = input()
for i in range(1,n+1):
    if(i%3==0):
        print('%d'%(i),end=" ")
    elif(i%10==3):
        print('%d' % (i), end=" ")


Fixed submission:
n = int(input())
print(" ",end="")
print(*[i for i in range(1,1+n) if i%3==0 or'3' in str(i)])

Buggy python submission (verdict: Runtime Error):
n = input()
for i in range(1,n+1):
    if(i%3==0):
        print('%d'%(i),end="")
    elif(i%10==3):
        print('%d' % (i), end="")


Fixed submission:
n = int(input())
print(" ",end="")
print(*[i for i in range(1,1+n) if i%3==0 or'3' in str(i)])

Buggy python submission (verdict: Runtime Error):
n = input()
for i in range(1,n+1):
    if(i%3==0):
        print('%d'%(i))
    elif(i%10==3):
        print('%d' % (i))


Fixed submission:
n = int(input())
print(" ",end="")
print(*[i for i in range(1,1+n) if i%3==0 or'3' in str(i)])

Buggy python submission (verdict: Runtime Error):
n = input()
s = ""
for i in range(1,n+1):
    if(i%3==0 or i%10==3):
        s += " " + str(i)
print(s)


Fixed submission:
n = int(input())
print(" ",end="")
print(*[i for i in range(1,1+n) if i%3==0 or'3' in str(i)])

Buggy python submission (verdict: Runtime Error):
n = input()
s = ""
for i in range(1,n+1):
    if(i%3==0 or i%10==3):
        s += " " + str(i)
print(s,end(""))


Fixed submission:
n = int(input())
print(" ",end="")
print(*[i for i in range(1,1+n) if i%3==0 or'3' in str(i)])

Buggy python submission (verdict: Runtime Error):
n = input()
s = ""
for i in range(1,n+1):
    if(i%3==0 or i%10==3):
        s += " " + str(i)
print(s,end(""))


Fixed submission:
n = int(input())
print(" ",end="")
print(*[i for i in range(1,1+n) if i%3==0 or'3' in str(i)])

Buggy python submission (verdict: Runtime Error):
n = input()
s = ""
for i in range(1,n+1):
    if(i%3==0 or i%10==3 or i//10==3 or i//100==3 or i//1000==3):
        s += " " + str(i)
print(s)


Fixed submission:
n = int(input())
print(" ",end="")
print(*[i for i in range(1,1+n) if i%3==0 or'3' in str(i)])

Buggy python submission (verdict: Runtime Error):
n = int(input())
print(" ",end"")
print(*[i for i in range(1,1+n) if i%3==0 or'3' in str(i)])


Fixed submission:
n = int(input())
print(" ",end="")
print(*[i for i in range(1,1+n) if i%3==0 or'3' in str(i)])

Buggy python submission (verdict: Runtime Error):
n = input()
print(' ',end='')
print(*[i for in range(1,1+n) if i%3==0 or'3' in str(i)])


Fixed submission:
n = int(input())
print(" ",end="")
print(*[i for i in range(1,1+n) if i%3==0 or'3' in str(i)])

Buggy python submission (verdict: Runtime Error):
n = input()
print(' 'end='')
print(*[i for in range(1,1+n) if i%3==0 or'3' in str(i)])


Fixed submission:
n = int(input())
print(" ",end="")
print(*[i for i in range(1,1+n) if i%3==0 or'3' in str(i)])

Buggy python submission (verdict: Runtime Error):
n = int(input())
print(" ",end="")
print(*[i for in range(1,1+n) if i%3==0 or'3' in str(i)])


Fixed submission:
n = int(input())
print(" ",end="")
print(*[i for i in range(1,1+n) if i%3==0 or'3' in str(i)])