n = int(input());
c = n-1;
a = n+1;
if n > 10000:
print(‘Error, the entered number exceeded the limit’)
else:
print («The next number for the number», n, «is», a, )
print(«The previous number for the number», n, «is», c)
n = int(input("Enter number:"))
c = n-1
a = n+1
exceptionLine="Error, the entered number exceeded the limit"
outputLine="The next number for the number "+str(n)+" is "+ str(a)+ "\n The previous number for the number "+ str(n)+ " is "+ str(c)
n_type = (outputLine, exceptionLine)
print(n_type[n>10000])