def is_kaprekar(number):
if number % 10 == 0: return False
sqd_num = str(number**2)
for i in range(len(sqd_num)-1):
if int(sqd_num[:i+1])+int(sqd_num[i+1:]) == number: return True
for i in range(2, 9000):
if is_kaprekar(i): print(i)
ZGVmIGlzX2thcHJla2FyKG51bWJlcik6CiAgICBpZiBudW1iZXIgJSAxMCA9PSAwOiByZXR1cm4gRmFsc2UKICAgIHNxZF9udW0gPSBzdHIobnVtYmVyKioyKQogICAgZm9yIGkgaW4gcmFuZ2UobGVuKHNxZF9udW0pLTEpOgogICAgICAgIGlmIGludChzcWRfbnVtWzppKzFdKStpbnQoc3FkX251bVtpKzE6XSkgPT0gbnVtYmVyOiByZXR1cm4gVHJ1ZQoKZm9yIGkgaW4gcmFuZ2UoMiwgOTAwMCk6CQogICAgaWYgaXNfa2FwcmVrYXIoaSk6IHByaW50KGkp