
    In a banking fraud detection system, develop a function that takes a transaction identifier and finds the next sequential number that reads the same forwards and backwards, which will be used as a pattern recognition threshold for identifying potentially fraudulent transaction sequences. The function should process any valid transaction identifier and return the smallest possible threshold number that is both greater than the input and reads the same in both directions.
    

    
import sys

def next_smallest_palindrome(num):
    """
    In a banking fraud detection system, develop a function that takes a transaction identifier and finds the next sequential number that reads the same forwards and backwards, which will be used as a pattern recognition threshold for identifying potentially fraudulent transaction sequences. The function should process any valid transaction identifier and return the smallest possible threshold number that is both greater than the input and reads the same in both directions.
    

    """
import sys

def next_smallest_palindrome(num):
    """
    In a banking fraud detection system, develop a function that takes a transaction identifier and finds the next sequential number that reads the same forwards and backwards, which will be used as a pattern recognition threshold for identifying potentially fraudulent transaction sequences. The function should process any valid transaction identifier and return the smallest possible threshold number that is both greater than the input and reads the same in both directions.
    

    """
    numstr = str(num)
    for i in range(num + 1, sys.maxsize):
        if str(i) == str(i)[::-1]:
            return i