#45610: 作弊解:D


aztec960523@gmail.com (王品翔)


n, m = map(int, input().split(" "))
arms_list = [0,1,2,3,4
            ,5,6,7,8,9
            ,153,370,371
            ,407,1634,8208
            ,9474,54748,92727
            ,93084,548834,1741725
            ]
count = 0

for i in arms_list:
    if i >= n and i <= m:
        print(i,end = " ")    
        count += 1

if count == 0:
    print("none")
#簡單來說就是直接把所有的阿姆斯壯數列出來,偷吃步解法
#53317: Re: 作弊解:D


andrewcode109@gmail.com (andrew)


n, m = map(int, input().split(" "))
arms_list = [0,1,2,3,4
            ,5,6,7,8,9
            ,153,370,371
            ,407,1634,8208
            ,9474,54748,92727
            ,93084,548834,1741725
            ]
count = 0

for i in arms_list:
    if i >= n and i <= m:
        print(i,end = " ")    
        count += 1

if count == 0:
    print("none")
#簡單來說就是直接把所有的阿姆斯壯數列出來,偷吃步解法


#53318: Re: 作弊解:D


andrewcode109@gmail.com (andrew)


n, m = map(int, input().split(" "))
arms_list = [0,1,2,3,4
            ,5,6,7,8,9
            ,153,370,371
            ,407,1634,8208
            ,9474,54748,92727
            ,93084,548834,1741725
            ]
count = 0

for i in arms_list:
    if i >= n and i <= m:
        print(i,end = " ")    
        count += 1

if count == 0:
    print("none")
#簡單來說就是直接把所有的阿姆斯壯數列出來,偷吃步解法