Edit the following object-oriented Python code to use inheritance.
class A:
    def __init__(self, x):
        self.x = x
    
    def get_x(self):
        return self.x

class B:
    def modify_x(self, x):
        self.x = x + 1
class A:
    def __init__(self, x):
        self.x = x
    
    def get_x(self):
        return self.x

class B(A):
    def modify_x(self, x):
        A.modify_x(self, x)
        self.x += 1