class A:
    def __init__(self, txt: str):
        self.q: F = None
        self.p: B = None
        self.z: G = None
        self.x: D = None
        self.u: F = None
        self.w: D = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.u: E = None
        self.q: F = None
        self.s: F = None
        self.t: E = None
        self.txt = txt

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

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

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

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

class G:
    def __init__(self, txt: str):
        self.p: B = None
        self.t: F = None
        self.v: B = None
        self.y: A = None
        self.txt = txt

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

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

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

class B:
    def __init__(self, txt: str):
        self.u: E = None
        self.q: F = None
        self.s: F = None
        self.t: E = None
        self.txt = txt

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

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

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

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

class G:
    def __init__(self, txt: str):
        self.p: B = None
        self.t: F = None
        self.v: B = None
        self.y: A = None
        self.txt = txt

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

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

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