class A:
    def __init__(self, txt: str):
        self.x: F = None
        self.s: D = None
        self.q: E = None
        self.y: D = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.v: A = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.u: I = None
        self.q: D = None
        self.z: D = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.q: E = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.t: I = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.o: H = None
        self.w: B = None
        self.x: I = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.v: A = None
        self.o: D = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.s: A = None
        self.o: C = None
        self.w: C = None
        self.y: G = None
        self.v: I = None
        self.x: C = None
        self.r: D = None
        self.z: D = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.w: H = None
        self.s: F = None
        self.o: B = None
        self.txt = txt

b = A("b")
f = B("f")
h = C("h")
e = D("e")
d = E("d")
l = F("l")
n = G("n")
c = H("c")
a = I("a")

b.x = l
b.s = e
b.y = e
b.q = d
f.v = b
h.u = a
h.q = e
h.z = e
e.q = d
d.t = a
l.o = c
l.w = f
l.x = a
n.v = b
n.o = e
c.s = b
c.o = h
c.w = h
c.x = h
c.y = n
c.v = a
c.r = e
c.z = e
a.w = c
a.s = l
a.o = f
assert c.y.v.x.w.v.x.txt == "
class A:
    def __init__(self, txt: str):
        self.x: F = None
        self.s: D = None
        self.q: E = None
        self.y: D = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.v: A = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.u: I = None
        self.q: D = None
        self.z: D = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.q: E = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.t: I = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.o: H = None
        self.w: B = None
        self.x: I = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.v: A = None
        self.o: D = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.s: A = None
        self.o: C = None
        self.w: C = None
        self.y: G = None
        self.v: I = None
        self.x: C = None
        self.r: D = None
        self.z: D = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.w: H = None
        self.s: F = None
        self.o: B = None
        self.txt = txt

b = A("b")
f = B("f")
h = C("h")
e = D("e")
d = E("d")
l = F("l")
n = G("n")
c = H("c")
a = I("a")

b.x = l
b.s = e
b.y = e
b.q = d
f.v = b
h.u = a
h.q = e
h.z = e
e.q = d
d.t = a
l.o = c
l.w = f
l.x = a
n.v = b
n.o = e
c.s = b
c.o = h
c.w = h
c.x = h
c.y = n
c.v = a
c.r = e
c.z = e
a.w = c
a.s = l
a.o = f
assert c.y.v.x.w.v.x.txt == "l"