class A:
    def __init__(self, txt: str):
        self.x: C = None
        self.r: E = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.o: H = None
        self.u: D = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.t: B = None
        self.w: F = None
        self.v: C = None
        self.x: F = None
        self.p: E = None
        self.r: C = None
        self.u: C = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.u: G = None
        self.r: B = None
        self.t: C = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.v: B = None
        self.o: C = None
        self.x: H = None
        self.y: C = None
        self.z: E = None
        self.q: G = None
        self.r: C = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.q: H = None
        self.t: C = None
        self.p: A = None
        self.s: H = None
        self.w: B = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.x: D = None
        self.z: D = None
        self.r: G = None
        self.txt = txt

l = A("l")
e = B("e")
m = C("m")
d = D("d")
c = E("c")
i = F("i")
n = G("n")
b = H("b")

l.x = m
l.r = c
e.o = b
e.u = d
m.q = d
d.t = e
d.w = i
d.x = i
d.v = m
d.r = m
d.u = m
d.p = c
c.u = n
c.r = e
c.t = m
i.v = e
i.o = m
i.y = m
i.r = m
i.x = b
i.z = c
i.q = n
n.q = b
n.s = b
n.t = m
n.p = l
n.w = e
b.x = d
b.z = d
b.r = n
assert l.r.u.w.o.r.p.x.txt == "
class A:
    def __init__(self, txt: str):
        self.x: C = None
        self.r: E = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.o: H = None
        self.u: D = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.t: B = None
        self.w: F = None
        self.v: C = None
        self.x: F = None
        self.p: E = None
        self.r: C = None
        self.u: C = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.u: G = None
        self.r: B = None
        self.t: C = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.v: B = None
        self.o: C = None
        self.x: H = None
        self.y: C = None
        self.z: E = None
        self.q: G = None
        self.r: C = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.q: H = None
        self.t: C = None
        self.p: A = None
        self.s: H = None
        self.w: B = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.x: D = None
        self.z: D = None
        self.r: G = None
        self.txt = txt

l = A("l")
e = B("e")
m = C("m")
d = D("d")
c = E("c")
i = F("i")
n = G("n")
b = H("b")

l.x = m
l.r = c
e.o = b
e.u = d
m.q = d
d.t = e
d.w = i
d.x = i
d.v = m
d.r = m
d.u = m
d.p = c
c.u = n
c.r = e
c.t = m
i.v = e
i.o = m
i.y = m
i.r = m
i.x = b
i.z = c
i.q = n
n.q = b
n.s = b
n.t = m
n.p = l
n.w = e
b.x = d
b.z = d
b.r = n
assert l.r.u.w.o.r.p.x.txt == "m"