for z in map(str,range(10,1e4)): if min(abs(int(x)-int(y))for x,y in zip(z,z[1:]))>5:print z