class A:
    def __init__(self, txt: str):
        self.s: E = None
        self.q: F = None
        self.z: B = None
        self.v: D = None
        self.u: C = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.y: F = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.p: G = None
        self.s: B = None
        self.y: B = None
        self.t: B = None
        self.z: A = None
        self.o: D = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.s: B = None
        self.z: D = None
        self.r: F = None
        self.p: A = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.o: A = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.z: B = None
        self.v: F = None
        self.p: F = None
        self.q: B = None
        self.txt = txt

b = A("b")
l = B("l")
e = C("e")
n = D("n")
h = E("h")
m = F("m")
a = G("a")

b.s = h
b.q = m
b.z = l
b.v = n
b.u = e
l.y = m
e.p = a
e.s = l
e.y = l
e.t = l
e.z = b
e.o = n
n.o = m
n.s = b
h.s = l
h.z = n
h.r = m
h.p = b
m.o = b
a.z = l
a.q = l
a.v = m
a.p = m
assert b.q.o.v.txt == "
class A:
    def __init__(self, txt: str):
        self.s: E = None
        self.q: F = None
        self.z: B = None
        self.v: D = None
        self.u: C = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.y: F = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.p: G = None
        self.s: B = None
        self.y: B = None
        self.t: B = None
        self.z: A = None
        self.o: D = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.s: B = None
        self.z: D = None
        self.r: F = None
        self.p: A = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.o: A = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.z: B = None
        self.v: F = None
        self.p: F = None
        self.q: B = None
        self.txt = txt

b = A("b")
l = B("l")
e = C("e")
n = D("n")
h = E("h")
m = F("m")
a = G("a")

b.s = h
b.q = m
b.z = l
b.v = n
b.u = e
l.y = m
e.p = a
e.s = l
e.y = l
e.t = l
e.z = b
e.o = n
n.o = m
n.s = b
h.s = l
h.z = n
h.r = m
h.p = b
m.o = b
a.z = l
a.q = l
a.v = m
a.p = m
assert b.q.o.v.txt == "n"