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

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

class C:
    def __init__(self, txt: str):
        self.w: D = None
        self.r: D = None
        self.o: H = None
        self.p: B = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.w: F = None
        self.txt = txt

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

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

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

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

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

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

class C:
    def __init__(self, txt: str):
        self.w: D = None
        self.r: D = None
        self.o: H = None
        self.p: B = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.w: F = None
        self.txt = txt

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

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

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

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

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