class A:
    def __init__(self, txt: str):
        self.q: E = None
        self.v: D = None
        self.z: G = None
        self.t: F = None
        self.x: C = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.q: F = None
        self.w: E = None
        self.x: D = None
        self.s: F = None
        self.z: G = None
        self.v: H = None
        self.o: G = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.p: G = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.w: H = None
        self.o: H = None
        self.u: G = None
        self.z: D = None
        self.q: B = None
        self.t: A = None
        self.v: A = None
        self.y: E = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.y: D = None
        self.x: F = None
        self.p: C = None
        self.v: A = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.z: A = None
        self.txt = txt

f = A("f")
m = B("m")
h = C("h")
l = D("l")
g = E("g")
e = F("e")
c = G("c")
j = H("j")

f.q = g
f.v = l
f.z = c
f.t = e
f.x = h
m.t = f
h.q = e
h.s = e
h.w = g
h.x = l
h.z = c
h.o = c
h.v = j
l.p = c
g.q = c
e.w = j
e.o = j
e.u = c
e.z = l
e.q = m
e.t = f
e.v = f
e.y = g
c.y = l
c.x = e
c.p = h
c.v = f
j.z = f
assert l.p.v.v.txt == "
class A:
    def __init__(self, txt: str):
        self.q: E = None
        self.v: D = None
        self.z: G = None
        self.t: F = None
        self.x: C = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.q: F = None
        self.w: E = None
        self.x: D = None
        self.s: F = None
        self.z: G = None
        self.v: H = None
        self.o: G = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.p: G = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.w: H = None
        self.o: H = None
        self.u: G = None
        self.z: D = None
        self.q: B = None
        self.t: A = None
        self.v: A = None
        self.y: E = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.y: D = None
        self.x: F = None
        self.p: C = None
        self.v: A = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.z: A = None
        self.txt = txt

f = A("f")
m = B("m")
h = C("h")
l = D("l")
g = E("g")
e = F("e")
c = G("c")
j = H("j")

f.q = g
f.v = l
f.z = c
f.t = e
f.x = h
m.t = f
h.q = e
h.s = e
h.w = g
h.x = l
h.z = c
h.o = c
h.v = j
l.p = c
g.q = c
e.w = j
e.o = j
e.u = c
e.z = l
e.q = m
e.t = f
e.v = f
e.y = g
c.y = l
c.x = e
c.p = h
c.v = f
j.z = f
assert l.p.v.v.txt == "l"