class A:
    def __init__(self, txt: str):
        self.q: B = None
        self.w: G = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.p: C = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.x: G = None
        self.u: G = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.z: A = None
        self.v: A = None
        self.u: F = None
        self.w: F = None
        self.t: G = None
        self.r: G = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.w: C = None
        self.p: C = None
        self.z: C = None
        self.y: A = None
        self.o: C = None
        self.r: F = None
        self.u: B = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.r: G = None
        self.y: B = None
        self.w: C = None
        self.z: A = None
        self.q: H = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.t: F = None
        self.txt = txt

l = A("l")
b = B("b")
k = C("k")
j = D("j")
d = E("d")
e = F("e")
h = G("h")
m = H("m")
i = D("i")

l.q = b
l.w = h
b.p = k
k.x = h
k.u = h
j.z = l
j.v = l
j.u = e
j.w = e
j.t = h
j.r = h
d.w = k
d.p = k
d.z = k
d.o = k
d.y = l
d.r = e
d.u = b
e.r = h
e.y = b
e.w = k
e.z = l
e.q = m
h.u = k
h.y = b
m.t = e
i.z = l
i.v = l
i.u = e
i.w = e
i.t = h
i.r = h
assert m.t.q.t.txt == "
class A:
    def __init__(self, txt: str):
        self.q: B = None
        self.w: G = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.p: C = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.x: G = None
        self.u: G = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.z: A = None
        self.v: A = None
        self.u: F = None
        self.w: F = None
        self.t: G = None
        self.r: G = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.w: C = None
        self.p: C = None
        self.z: C = None
        self.y: A = None
        self.o: C = None
        self.r: F = None
        self.u: B = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.r: G = None
        self.y: B = None
        self.w: C = None
        self.z: A = None
        self.q: H = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.t: F = None
        self.txt = txt

l = A("l")
b = B("b")
k = C("k")
j = D("j")
d = E("d")
e = F("e")
h = G("h")
m = H("m")
i = D("i")

l.q = b
l.w = h
b.p = k
k.x = h
k.u = h
j.z = l
j.v = l
j.u = e
j.w = e
j.t = h
j.r = h
d.w = k
d.p = k
d.z = k
d.o = k
d.y = l
d.r = e
d.u = b
e.r = h
e.y = b
e.w = k
e.z = l
e.q = m
h.u = k
h.y = b
m.t = e
i.z = l
i.v = l
i.u = e
i.w = e
i.t = h
i.r = h
assert m.t.q.t.txt == "e"