'''

class Solution:

def reverse(self, x):

"""

:type x: int

:rtype: int

"""

isNegative = False

if(x<0):

isNegative = True

x = abs(x)

s = ''.join(reversed(str(x)))

s = int(s)

if(isNegative):

s = -s

if(abs(s) > 2**31):

s = 0

return s

'''