#Вывести на экран числа от 1000 до 9999 такие, что среди цифр нет цифр 5 и цифры 6.
for i in range(1000, 10000):
x = i
x1 = x // 1000
x2 = x % 10
x3 = (x % 100) // 10
x4 = (x // 100) % 10
if x1 == 5 or x1 == 6:
x = x + 1
print(x)
if x2 == 5 or x2 == 6:
x = x + 1
print(x)
if x3 == 5 or x3 == 6:
x = x + 1
print(x)
if x4 == 5 or x4 == 6:
x = x + 1
print(x)
for i in range(1000, 10000):
x = i
x1 = x // 1000
x2 = x % 10
x3 = (x % 100) // 10
x4 = (x // 100) % 10
if x1 == 5 or x1 == 6:
x = x + 1
print(x)
if x2 == 5 or x2 == 6:
x = x + 1
print(x)
if x3 == 5 or x3 == 6:
x = x + 1
print(x)
if x4 == 5 or x4 == 6:
x = x + 1
print(x)