numbers=[]
for a in range(1,5):
for b in range(1,5):
for c in range(1,5):
numbers.append(a*100+b*10+c)
print(len(numbers))
for number in numbers:
print(number)
numbers=[]
for a in range(1,5):
for b in range(1,5):
for c in range(1,5):
numbers.append(a*100+b*10+c)
print(len(numbers))
for number in numbers:
print(number)