class Test:
def __init__(self, name):
self.name = name
self.other = self.Other(self)
class Other:
def __init__(self, test):
self.test = test
def get_data(self):
print(self.test.name)
a = Test('wohoo')
a.other.get_data()