Problem:


Structured Programming

In programming languages like C/C++, a goto statement provides an unconditional jump from the "goto" to a labeled statement. For example, a statement "goto CHECK_NUM;" is executed, control of the program jumps to CHECK_NUM. Using these constructs, you can implement, for example, loops.

Note that use of goto statement is highly discouraged, because it is difficult to trace the control flow of a program which includes goto.

Write a program which does precisely the same thing as the following program (this example is wrtten in C++). Let's try to write the program without goto statements.

void call(int n){
  int i = 1;
 CHECK_NUM:
  int x = i;
  if ( x % 3 == 0 ){
    cout n is given in a line.

Output

Print the output result of the above program for given integer n.

Constraints

3 ≤ n ≤ 10000

Sample Input

30

Sample Output

 3 6 9 12 13 15 18 21 23 24 27 30

  Put a single space character before each element.



Sample input:
30


Sample output:
 3 6 9 12 13 15 18 21 23 24 27 30

Submission status: Runtime Error

Solution code:
n=int(input())

result=[]
for i in range(1,n+1):
    if i %3==0:
        result.append(i)
    else:
        k=i
        for j in range(1,len(str(n)+1):
            if k%(10**j)==3:
                result.append(i)
                break
            else:
                k=k//10**j
        else:
            continue

print(" ", *result)

Submission status: Runtime Error

Solution code:
n=int(input())

result=[]
for i in range(1,n+1):
    if i %3==0:
        result.append(i)
    else:
        k=i
        for j in range(1,len(str(n)+1):
            if k%(10**j)==3:
                result.append(i)
                break
            else:
                k=k//10**j
        else:
            continue

print(" ", *result," ")

Submission status: Runtime Error

Solution code:
n=int(input())

result=[]
for i in range(1,n+1):
    if i %3==0:
        result.append(i)
    else:
        k=i
        for j in range(1,len(str(n)+1):
            if k%(10**j)==3:
                result.append(i)
                break
            else:
                k=k//10**j
        else:
            continue

print(" ", *result,"")

Submission status: Runtime Error

Solution code:
n=int(input())

result=[]
for i in range(1,n+1):
    if i %3==0:
        result.append(i)
    else:
        k=i
        for j in range(1,len(str(n)+1):
            if k%(10**j)==3:
                result.append(i)
                break
            else:
                k=k//10**j
        else:
            continue

r=" "+" ".join(result)
print(r)

Submission status: Runtime Error

Solution code:
n=int(input())

result=[]
for i in range(1,n+1):
    if i %3==0:
        result.append(i)
    else:
        k=i
        for j in range(1,len(str(n)+1):
            if k%(10**j)==3:
                result.append(i)
                break
            else:
                k=k//10**j
        else:
            continue

print(*result

Submission status: Runtime Error

Solution code:
n=int(input())

result=[]

for i in range(1,n+1):
    if i %3==0:
        result.append(i)
    else:
        k=i
        for j in range(1,len(str(n)+1):
            if k%(10**j)==3:
                result.append(i)
                break
            else:
                k=k//(10**j)
        else:
            continue

print(" ", *result)

Submission status: Runtime Error

Solution code:
n=int(input())
 
result=[]
for i in range(1,n+1):
    if i %3==0:
        result.append(i)
    else:
        k=i
        for j in range(1,len(str(n))+1):
            if k%10**==3:
                result.append(i)
                break
            else:
                k=k//10**j
        else:
            continue
 
print("",*result)

Submission status: Runtime Error

Solution code:
input("")
print(3 6 9 12 13 15 18 21 23 24 27 30)

Submission status: Runtime Error

Solution code:
# Aizu Problem ITP_1_5_D: Structured Programming
#
import sys, math, os

# read input:
PYDEV = os.environ.get('PYDEV')
if PYDEV=="True":
    sys.stdin = open("sample-input.txt", "rt")

res = []


def CHECK_NUM(n, i):
    x = i
    if x % 3 == 0:
        res.append(i)
    else:
        while True:
            if x % 10 == 3:
                res.append(i)
                break
            x //= 10
            if x == 0:
                break
    i += 1
    if i <= n:
        CHECK_NUM(n, i)
        
        
def call(n):
    CHECK_NUM(n, 1)
    

n = int(input())
call(n)
print(' ' + ' '.join([str(r) for r in res]))

Submission status: Runtime Error

Solution code:
n = int(input())

for i in range(1, n + 1):
    if i % 3 == 0 or i % 10 == 3:
        print(f' {i}', end='')
print()

Submission status: Runtime Error

Solution code:
a=[]
n=int(input())
for i in range(3,n+1):
    if i%3==0 or i%10==3:
        a.append(i)
print(' '+*a)

Submission status: Runtime Error

Solution code:
n=int(input())
a,c,i=[],0,1
while i <= n:
    if c==0:
        x=i
        if x%3==0:
            print(' '+i, end='')
            i+=1
            continue
    c=0
    if x%10==3:
        print(' '+i, end='')
        i+=1
        continue
    x//=10
    if x == 0:
        i+=1
        continue
    else:
        c=1
print()

Submission status: Runtime Error

Solution code:
  n = int(input())                                                            
  for i in range(n + 1):
      if i != 0 and i % 3 == 0:
          print('',i,end='')
      elif '3' in str(i):
          print('',i,end='')

Submission status: Runtime Error

Solution code:
  n = int(input())                                                            
  for i in range(n + 1):
      if i != 0 and i % 3 == 0:
          print(' ' + i,end='')
      elif '3' in str(i):
          print(' ' + i,end='')

Submission status: Runtime Error

Solution code:
  n = int(input())                                                            
  for i in range(n + 1):
      if i != 0 and i % 3 == 0:
          print(' ' + i,end='')
          elif '3' in str(i):
              print(' ' + i,end='')

Submission status: Runtime Error

Solution code:
  n = int(input())
  for i in range(n + 1):
      if i != 0 and i % 3 == 0:
          print('', i,end='')
      elif '3' in str(i):
          print('', i,end='')

Submission status: Runtime Error

Solution code:
n = int(input())
for i in range(1, n+1):
 if i%3 == 0:
  print(" " + i)
 elif i%10 == 3:
  print(" " + i)
 div = i
 while div//10:
  div = div//10
  if div%10 == 3:
   print(" " + div)
   div = 0

Submission status: Runtime Error

Solution code:
n = int(input())
for i in range(1, n+1):
 if i%3 == 0:
  str +=" " + str(i)
 elif i%10 == 3:
  str +=" " + str(i)
 div = i
 while div//10:
  div = div//10
  if div%10 == 3:
   str +=" " + str(div)
   div = 0
print(str)

Submission status: Runtime Error

Solution code:
n = int(input())
str = ''
for i in range(1, n+1):
 if i%3 == 0:
  str += " " + str(i)
 elif i%10 == 3:
  str += " " + str(i)
 div = i
 while div//10:
  div = div//10
  if div%10 == 3:
   str += " " + str(div)
   div = 0
print(str)

Submission status: Runtime Error

Solution code:
n = int(input())
for i in range(1, n+1):
 if i%3 == 0:
  strng += " " + str(i)
 elif i%10 == 3:
  strng += " " + str(i)
 div = i
 while div//10:
  div = div//10
  if div%10 == 3:
   strng += " " + str(div)
   div = 0
print(strng)

Submission status: Runtime Error

Solution code:
n = int(input())

for i in range(1, n+1):
 if i%3 == 0:
  ans += " " + str(i)
 elif i%10 == 3:
  ans += " " + str(i)
 div = i
 while div//10:
  div = div//10
  if div%10 == 3:
   ans += " " + str(div)
   div = 0
print(ans)

Submission status: Runtime Error

Solution code:
text = ""
for i in range(1, n+1):
	if i % 3 == 0:
		text += " " + str(i)
	elif:
		while i:
			if i % 10 == 3:
				text += " " + str(i)
			else:
				i /= 10
print text

Submission status: Runtime Error

Solution code:
#3????????°??¨10??§?????£????????????3??????????????????print?????????
#???????????????????????§??????????????????????????????
#???????????°????????\????????¨???????????????
#??????????????¨????????????????????¶??§???????????°????????????????????????????????????
#3????????°?????????3?¶?????????°?????\??????????¶?????????°?????????????????????????????§??????
#?????????????????????
#?????????10??§?????£????????????3??????????????????????????????????????????
#??\??????????????§??????????????????3?????¨?????????????????????????????????
#????????????????????¨21??§???????????????????????????
#????????????????????¨3?????¨?????¨????????????????????\??£???????????????
x = int(input())
i = 1
print(" ", end="")
while i <= x:
    
    if (i % 3) == 0:
        if (i + 3) <= x:
            print(i, end=" ")
        elif x > 3 and (x % 10) == 3:
            print(i, end=" ")
        else:
            print(i)
      
    elif (i % 10) == 3:
        if i != x:
            print(i, eqnd=" ")
        else:
            print(i)
    
    i += 1

Submission status: Runtime Error

Solution code:
for i in range(1,int(input)+1):
 a=i
 while(a>0):
  if a%3==0:
   print(i,end='')
   break
  a/=10

Submission status: Runtime Error

Solution code:
for i in range(1,int(input())+1):
 a=i
 while(a>0):
  if a%3==0 or a%10==3:
   print(' ',i,end=' ')
   break
  a/=10

Submission status: Runtime Error

Solution code:
for i in range(1,int(input())+1):
 a=i
 while(a>0):
  if a%3==0 or a%10==3:
   print(f' {i}',end=' ')
   break
  a/=10

Submission status: Runtime Error

Solution code:
for i in range(1,int(input())+1):
 a=i
 while(a>0):
  if a%3==0 or a%10==3:
   print(f' {i}',end='')
   break
  a/=10

Submission status: Runtime Error

Solution code:
for i in range(1,int(input())+1):
 if a%3==0
  if a%3==0 or a%10==3:
   print(f' {i}',end='')
   break

Submission status: Runtime Error

Solution code:
for i in range(1,int(input())+1):
 if a%3==0 or a%10==3:print(f' {i}',end='')

Submission status: Runtime Error

Solution code:
n=int(input())
for i in range(1,n+1):
 a=i
 m=[]
 if a%3==0:
  m.append(i)
  continue
 while a>0:
  if a%10==3:
   m.append(i)
   break
  a/=10
print(' '.join(m))

Submission status: Runtime Error

Solution code:
n=int(input())
m=[]
for i in range(1,n+1):
 a=i
 if a%3==0:
  m.append(i)
  continue
 while a>0:
  if a%10==3:
   m.append(i)
   break
  a/=10
print(' '+*m)

Submission status: Runtime Error

Solution code:
print(' '+*[i for i in range(3,int(input())+1)if i%3==0 or '3' in str(i)])

Submission status: Runtime Error

Solution code:
#include <iostream>

using namespace std;

int main(){
    int n;
    cin >> n;
    for (int i = 3; i <= n; i++) {
        if (i%3==0) cout << ' ' << i;
        else
        {
            int x = i;
            while (x) {
                if (x%10 == 3) {
                    cout << ' ' << i;
                    break;
                }
                x /= 10;
            }
        }
    }
    cout << endl;
    return 0;
}

Submission status: Runtime Error

Solution code:

n=int(input())

for i in range(n)
    if i % 3 == 0 or i//10 == 3 :
        print(str(i) + " ")
    else :

Submission status: Runtime Error

Solution code:

n=int(input())

for i in range(n):
    if i % 3 == 0 or i//10 == 3 :
        print(str(i) + " ")
    else :

Submission status: Runtime Error

Solution code:
while True :
    h, w = [int(x) for x in input().split()]
    if h == w == 0 : break
    for i in range(h) : print(('#.'*w)[i%2:][:w])
    print()

Submission status: Runtime Error

Solution code:
n=int(input())
result =0
while i <=n:
    result/=i
    i/=i
    print(result)

Submission status: Runtime Error

Solution code:
n=int(input())
for i in range(1,n+1)
   if i%3==0:
     print(" "+ str(i),end=" ")
   else:
       j=str(i)
       if "3" in s:
        print(" "+str(i),end=" ")
print(" ")

Submission status: Runtime Error

Solution code:
n=int(input())
for i in range(1,n+1)
   if i%3==0:
     print(" "+ str(i),end=" ")
   else:
       j=str(i)
       if "3" in j:
        print(" "+str(i),end=" ")
print(" ")

Submission status: Runtime Error

Solution code:
n=int(input())
for i in range(1,n+1)
   if i%3==0:
      print(" "+ str(i),end=" ")
   else:
       j=str(i)
       if "3" in j:
          print(" "+str(i),end=" ")
print(" ")

Submission status: Runtime Error

Solution code:
n = int(input())
for k in range(1, n + 1):
    if i % 3 == 0:
        print(" " + str(k), end="")
    else:
        j = str(k)
        if "3" in j:
            print(" " + str(k), end="")
print("")

Submission status: Runtime Error

Solution code:
n = int(input())
num_list = [i for i in range(1,n+1)]
num2_list = [i for i in num_list if i%3==0]#3で割り切れる値
list_str = [s for s in map(str,list(d)) if '3' in s]#3が含まれる場合
list_in = list(map(int,list_str))#list変換
list_uniq = list(set(num2_list+list_in))
list_uniq.sort()
print(' '+' '.join(str(i) for i in list_uniq))

Submission status: Runtime Error

Solution code:
def include3(n):
	cond = 0
	while True:
		if n%10==3:
			cond = 1
			return cond
		elif n>9:
			n /= 10
		else:
			return cond

n = int(input())
print(' ',end='')
for i in range(i,n+1):
	if i%3==0 or include3(n)==1:
		print('%d ' % (n))

Submission status: Runtime Error

Solution code:
n = input()
for i in range(1,n+1):
    if(i%3==0):
        print('%d'%(i) )

Submission status: Runtime Error

Solution code:
n = input()
for i in range(1,n+1):
    if(i%3==0):
        print('%d'%(i),end=" ")

Submission status: Runtime Error

Solution code:
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=" ")

Submission status: Runtime Error

Solution code:
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="")

Submission status: Runtime Error

Solution code:
n = input()
for i in range(1,n+1):
    if(i%3==0):
        print('%d'%(i))
    elif(i%10==3):
        print('%d' % (i))

Submission status: Runtime Error

Solution code:
n = input()
s = ""
for i in range(1,n+1):
    if(i%3==0 or i%10==3):
        s += " " + str(i)
print(s)

Submission status: Runtime Error

Solution code:
n = input()
s = ""
for i in range(1,n+1):
    if(i%3==0 or i%10==3):
        s += " " + str(i)
print(s,end(""))

Submission status: Runtime Error

Solution code:
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)

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
a = int(input())
b = []
for i in range(1, a+1, 1):
    if "3" in str(i):
        b.append(i)
    elif i % 3 == 0:
        b.append(i)
    else:
        pass
for _ in b:
    print(b + " ", end='')

Submission status: Runtime Error

Solution code:
a = int(input())
b = []
for i in range(1, a+1, 1):
    if "3" in str(i):
        b.append(i)
    elif i % 3 == 0:
        b.append(i)
    else:
        pass
for i in b:
    print(i + " ", end='')

Submission status: Runtime Error

Solution code:
n = input()

n = int(n)

for i in range(1, n+1):
  if '3' in str(i)
    print(i)

Submission status: Runtime Error

Solution code:
n=int(input())
for i in range(i,n+1):
    if i%3==0:
        print(' '+str(i),end='')
    elif i%10==3:
        print(' '+str(i),end='')

Submission status: Runtime Error

Solution code:
#include <iostream>

using namespace std;

int main()
{
    int n,x;
    cin >> n;
    for(int i=1;i<=n;i++){
        if(i%3==0) cout << " " << i;
        else if(i%10==3) cout << " " << i;
        else{
            for(int ii =0;ii<4;ii++){
                x=i;
                x /=10;
                if(x%10==3){
                    cout << " " << i;
                    break;
                }
            }

        }
    }
    cout << endl;
}

Submission status: Runtime Error

Solution code:
n=int(input())
c=1
print(" ",end=")
while c <=n:
  if c%3==0 or c%10==3:
    print(c)
  c +=1
print()

Submission status: Runtime Error

Solution code:
n=int(input())
ans=""
for i in range(1, n+1)
  if i%3==0 or i%10==3:
    ans += " "+str(i)
print(ans)

Submission status: Runtime Error

Solution code:
n=int(input())
ans=""
for i in range(1, n+1)
  if i%3==0 or i%10==3:
    ans += str(i)
print(ans)

Submission status: Runtime Error

Solution code:
n=int(input())
d=[]
for i in range(1, n+1)
  if i%3==0 or i%10==3:
    d.append(i)
print(" ", end="")
print(*d)

Submission status: Runtime Error

Solution code:
n=int(input())
d=[]
for i in range(1, n+1)
  if i%3==0 or "3" in str(i):
    d.append(i)
print(' ', end="")
print(*d)

Submission status: Runtime Error

Solution code:
n=int(input())
d=[]
for i in range(3, n+1)
  if i%3==0 or "3" in str(i):
    d.append(i)
print(' ', end="")
print(*d)

Submission status: Runtime Error

Solution code:
#include <iostream>
#include <cstdlib>
#include <vector>
#include <algorithm>
using namespace std;
void call(int n);
int main(){
	int n;
	cin >> n;
	call(n);
}

void call(int n){
	int i = 1;
	while(i <= n){//CHECK_NUM
		if(i % 3 == 0 || i % 10 == 3){
			cout << " " << i;
		}else if( i > 30){
			int tmp = i;
			while(tmp > 10){
				tmp /= 10;
				if(tmp <= 3 && tmp % 3 == 0){
					cout << " " << i;
				}
			}
		}
		i++;
	}
	cout << endl;
}

Submission status: Runtime Error

Solution code:
n = int(input())
for i in range(1 : n+1):
	if i > n:
		break
	if i % 3 == 0:
		print(" ", i, end="")
	else:
		if i % 10 ==3:
			print(" ", i, end="")

Submission status: WA: Presentation Error

Solution code:
a = input()
i = 0
for i in range(int(a)):
    if ((int(i) + 1) % 3) == 0:
        print(' {}'.format(int(i)+1),end='')
    elif((int(i) + 1) % 10) == 3:
        print(' {}'.format(int(i)+1),end='')

Submission status: WA: Presentation Error

Solution code:
a = input()
i = 0
for i in range(int(a)):
    if ((int(i) + 1) % 3) == 0:
        print(' ',end='')
        print('{}'.format(int(i)+1),end='')
    elif((int(i) + 1) % 10) == 3:
        print(' ',end='')
        print('{}'.format(int(i)+1),end='')

Submission status: WA: Presentation Error

Solution code:
a = input()
i = 0
for i in range(int(a)):
    if ((int(i) + 1) % 3) == 0:
        print(' ',end='')
        print('{}'.format(int(i)+1),end='')
    elif((int(i) + 1) % 10) == 3:
        print(' ',end='')
        print('{}'.format(int(i)+1),end='')
        i /= 10

Submission status: WA: Presentation Error

Solution code:
n = int(input())

for i in range(1, n + 1):
	x = i

	if x % 3 == 0:
		print("", i, end = "")
		continue

	while True:
		if x % 10 == 3:
			print("", i, end = "")
			break

		x /= 10
		if x != 0:
			continue

		break

Submission status: WA: Presentation Error

Solution code:
a = int(input())
b = []
for i in range(1,a+1):
    if i%3 == 0:
        b.append(i)
    elif i%10 == 3:
        b.append(i)
    else:
        continue
print(" ",end="")
for i in b:
    print(" "+str(i),end="")

Submission status: WA: Presentation Error

Solution code:
a = int(input())
b = []
for i in range(1,a+1):
    if i%3 == 0:
        b.append(i)
    elif i%10 == 3:
        b.append(i)
    else:
        continue
print(" ",end="")
for i in b:
    print(" "+str(i),end="")
print("\n",end="")

Submission status: WA: Presentation Error

Solution code:
import re
list = []
n = int(input())
for i in range(1, n + 1):
    if i % 3 == 0 or re.search('3', str(i)):
        list.append(str(i))
print(' '.join(list))

Submission status: WA: Presentation Error

Solution code:
import sys
n = int(input())
for i in range(1, n + 1):
    if i % 3 == 0 or i % 10 == 3:
        sys.stdout.write("%d " % i)

Submission status: WA: Presentation Error

Solution code:
import sys
n = int(input())
for i in range(1, n + 1):
    if i % 3 == 0 or i % 10 == 3:
        sys.stdout.write(" %d" % i)

Submission status: WA: Presentation Error

Solution code:
out = ""
for i in range(1, int(input()) + 1):
    if i % 3 == 0 or i % 10 == 3:
        out += str(i) + " "
print(out)

Submission status: WA: Presentation Error

Solution code:
num = int(input())
for i in range(1, num + 1):
    if i % 3 == 0:
        print(f' {i}', end='')
        continue
    if i % 10 == 3:
        print(f' {i}', end='')

Submission status: WA: Presentation Error

Solution code:
num = int(input())
for i in range(1, num + 1):
    if i % 3 == 0:
        print(f' {i}', end='')
        continue
    if i % 10 == 3:
        print(f' {i}', end='')

Submission status: WA: Presentation Error

Solution code:
n=int(input())
for i in range(n):
    if (i+1)%3==0:
        print(" "+str(i+1),end="")
    elif (i+1)%10==3:
        print(" "+str(i+1),end="")

Submission status: WA: Presentation Error

Solution code:
n=int(input())
for i in range(n):
    if (i+1)%3==0:
        print(" "+str(i+1),end="")
    elif (i+1)%10==3:
        print(" "+str(i+1),end="")
print(" ")

Submission status: WA: Presentation Error

Solution code:
n=int(input())
for i in range(n):
    if (i+1)%3==0:
        print(" "+str(i+1),end="")
    elif (i+1)%10==3:
        print(" "+str(i+1),end="")
print(" ",end="")

Submission status: WA: Presentation Error

Solution code:
n = int(input())
a =[]
for i in range(1, n+1):
    if i % 3 == 0 or i % 10 == 3:
        a.append(i)
print(*a)

Submission status: WA: Presentation Error

Solution code:
n = int(input())
a =[]
for i in range(1, n+1):
    if i % 3 == 0 or i % 10 == 3 or (i//100)%10 == 3 or (i//1000)%10 == 3 or (i//10000)%10 == 3:
        a.append(i)
print(*a)

Submission status: WA: Presentation Error

Solution code:
n = int(input())


def inclede_3(n, m):
    if n % 10 == 3:
        print("%d " % m, end="")
    elif (n // 10):
        inclede_3(n // 10, m)


for i in range(1, n + 1):
    if i % 3 == 0:
        print("%d " % i, end="")
    else:
        inclede_3(i, i)

Submission status: WA: Presentation Error

Solution code:
n = int(input())
print(" ", end="")


def inclede_3(n, m):
    if n % 10 == 3:
        print("%d " % m, end="")
    elif (n // 10):
        inclede_3(n // 10, m)


for i in range(1, n + 1):
    if i % 3 == 0:
        print("%d " % i, end="")
    else:
        inclede_3(i, i)

Submission status: WA: Presentation Error

Solution code:
n = int(input())
print(" ", end="")


def inclede_3(n, m):
    if n % 10 == 3:
        print("%d " % m, end="")
    elif (n // 10):
        inclede_3(n // 10, m)


for i in range(1, n + 1):
    if i % 3 == 0:
        print("%d " % i, end="")
    else:
        inclede_3(i, i)
print()

Submission status: WA: Presentation Error

Solution code:
n = int(input())
print(" ", end="")


def inclede_3(n, m):
    if n % 10 == 3:
        print("%d " % m, end="")
    elif (n // 10):
        inclede_3(n // 10, m)


for i in range(1, n + 1):
    if i % 3 == 0:
        print("%d " % i, end="")
    else:
        inclede_3(i, i)

print()

Submission status: WA: Presentation Error

Solution code:
n = int(input())


def inclede_3(n, m):
    if n % 10 == 3:
        print("%d " % m, end="")
    elif (n // 10):
        inclede_3(n // 10, m)


for i in range(1, n + 1):
    if i % 3 == 0:
        print("%d " % i, end="")
    else:
        inclede_3(i, i)

print()

Submission status: WA: Presentation Error

Solution code:
inData = int(input())

seqData = list(range(1,inData+1,1))
outData = [0] * inData
for thisData in seqData:
    if thisData == inData:
        if thisData%3 == 0 or thisData%10==3 or int((thisData/10))%10==3>=1 :
            print(" "+str(thisData))
        else:
            pass
    else:
        if thisData%3 == 0 or thisData%10==3 or int((thisData/10))%10==3>=1 :
            print(" "+str(thisData), end = "")
        else:
            pass

Submission status: WA: Presentation Error

Solution code:
inData = int(input())

seqData = list(range(1,inData+1,1))
outData = [0] * inData
for thisData in seqData:
    if thisData == inData:
        if thisData%3 == 0 or thisData%10==3 or int((thisData/10))%10==3>=1 :
            print(" "+str(thisData))
        else:
            print("\r\n")
    else:
        if thisData%3 == 0 or thisData%10==3 or int((thisData/10))%10==3>=1 :
            print(" "+str(thisData), end = "")
        else:
            pass

Submission status: WA: Presentation Error

Solution code:
inData = int(input())

seqData = list(range(1,inData+1,1))
outData = [0] * inData
for thisData in seqData:
    if thisData == inData:
        if thisData%3 == 0 or thisData%10==3 or int((thisData/10))%10==3>=1 :
            print(" "+str(thisData))
        else:
            print(" \r\n")
    else:
        if thisData%3 == 0 or thisData%10==3 or int((thisData/10))%10==3>=1 :
            print(" "+str(thisData), end = "")
        else:
            pass

Submission status: WA: Presentation Error

Solution code:
inData = int(input())

seqData = list(range(1,inData+1,1))
outData = [0] * inData
for thisData in seqData:
    if thisData == inData:
        if thisData%3 == 0 or thisData%10==3 or int((thisData/10))%10==3:
            print(" "+str(thisData))
        else:
            print(" \r\n")
    else:
        if thisData%3 == 0 or thisData%10==3 or int((thisData/10))%10==3:
            print(" "+str(thisData), end = "")
        else:
            pass

Submission status: WA: Presentation Error

Solution code:
inData = int(input())

seqData = list(range(1,inData+1,1))
outData = [0] * inData
for thisData in seqData:
    if thisData == inData:
        if thisData%3 == 0 or thisData%10==3 or int((thisData/10))%10==3:
            print(" "+str(thisData))
        else:
            print(" \n")
    else:
        if thisData%3 == 0 or thisData%10==3 or int((thisData/10))%10==3:
            print(" "+str(thisData), end = "")
        else:
            pass

Submission status: WA: Presentation Error

Solution code:
inData = int(input())

seqData = list(range(1,inData+1,1))
outData = [0] * inData
for thisData in seqData:
    if thisData == inData:
        if thisData%3 == 0 or thisData%10==3 or int((thisData/10))%10==3:
            print(" "+str(thisData))
        else:
            print("\n")
    else:
        if thisData%3 == 0 or thisData%10==3 or int((thisData/10))%10==3:
            print(" "+str(thisData), end = "")
        else:
            pass

Submission status: WA: Presentation Error

Solution code:
inData = int(input())

seqData = list(range(1,inData+1,1))
outData = [0] * inData
for thisData in seqData:
    if thisData == inData:
        if thisData%3 == 0 or thisData%10==3 or int((thisData/10))%10==3:
            print(" "+str(thisData))
        else:
            pass
    else:
        if thisData%3 == 0 or thisData%10==3 or int((thisData/10))%10==3:
            print(" "+str(thisData), end = "")
        else:
            pass

Submission status: WA: Presentation Error

Solution code:
inData = int(input())

seqData = list(range(1,inData+1,1))
outData = [0] * inData
for thisData in seqData:
    if thisData == inData:
        if thisData%3 == 0 or thisData%10==3 or int((thisData/10))%10==3:
            print(" "+str(thisData))
        else:
            print(" ")
    else:
        if thisData%3 == 0 or thisData%10==3 or int((thisData/10))%10==3:
            print(" "+str(thisData), end = "")
        else:
            pass

Submission status: WA: Presentation Error

Solution code:
inData = int(input())

seqData = list(range(1,inData+1,1))
outData = [0] * inData
for thisData in seqData:
    if thisData == inData:
        if thisData%3 == 0 or thisData%10==3:
            print(" "+str(thisData), end = "")
        else:
            for i in range(5):
                i=i+1
                over =  10 ** i
                tmp = thisData/over
                if int(tmp % 10) == 3:
                    print(" "+str(thisData), end = "")
                    break
                else:
                    print("")
    else:
        if thisData%3 == 0 or thisData%10==3:
            print(" "+str(thisData), end = "")
        else:
            for i in range(5):
                i=i+1
                over =  10 ** i
                tmp = thisData/over
                if int(tmp % 10) == 3:
                    print(" "+str(thisData), end = "")
                    break
                else:
                    pass

Submission status: WA: Presentation Error

Solution code:
inData = int(input())

seqData = list(range(1,inData+1,1))
outData = [0] * inData
for thisData in seqData:
    if thisData == inData:
        if thisData%3 == 0 or thisData%10==3:
            print(" "+str(thisData), end = "")
        else:
            for i in range(5):
                i=i+1
                over =  10 ** i
                tmp = thisData/over
                if int(tmp % 10) == 3:
                    print(" "+str(thisData), end = "")
                    break
                else:
                    print("")
    else:
        if thisData%3 == 0 or thisData%10==3:
            print(" "+str(thisData), end = "")
        else:
            for i in range(5):
                i=i+1
                over =  10 ** i
                tmp = thisData/over
                if int(tmp % 10) == 3:
                    print(" "+str(thisData), end = "")
                    break
                else:
                    pass

Submission status: WA: Presentation Error

Solution code:
inData = int(input())

seqData = list(range(1,inData+1,1))
outData = [0] * inData
for thisData in seqData:
    if thisData == inData:
        if thisData%3 == 0 or thisData%10==3:
            print(" "+str(thisData))
        else:
            for i in range(5):
                i=i+1
                over =  10 ** i
                tmp = thisData/over
                if int(tmp % 10) == 3:
                    print(" "+str(thisData))
                    break
                else:
                    print("")
    else:
        if thisData%3 == 0 or thisData%10==3:
            print(" "+str(thisData), end = "")
        else:
            for i in range(5):
                i=i+1
                over =  10 ** i
                tmp = thisData/over
                if int(tmp % 10) == 3:
                    print(" "+str(thisData), end = "")
                    break
                else:
                    pass

Submission status: WA: Presentation Error

Solution code:
inData = int(input())

seqData = list(range(1,inData+1,1))
outData = [0] * inData
for thisData in seqData:
    if thisData == inData:
        if thisData%3 == 0 or thisData%10==3:
            print(" "+str(thisData))
        else:
            for i in range(5):
                i=i+1
                over =  10 ** i
                tmp = thisData/over
                if int(tmp % 10) == 3:
                    print(" "+str(thisData))
                    break
                else:
                    print(" ")
    else:
        if thisData%3 == 0 or thisData%10==3:
            print(" "+str(thisData), end = "")
        else:
            for i in range(5):
                i=i+1
                over =  10 ** i
                tmp = thisData/over
                if int(tmp % 10) == 3:
                    print(" "+str(thisData), end = "")
                    break
                else:
                    pass