class A:
    def __init__(self, txt: str):
        self.z: B = None
        self.w: B = None
        self.x: A = None
        self.y: C = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.z: C = None
        self.y: D = None
        self.v: F = None
        self.s: D = None
        self.t: F = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.t: D = None
        self.s: B = None
        self.w: C = None
        self.r: E = None
        self.x: B = None
        self.txt = txt

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

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

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

class C:
    def __init__(self, txt: str):
        self.z: C = None
        self.y: D = None
        self.v: F = None
        self.s: D = None
        self.t: F = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.t: D = None
        self.s: B = None
        self.w: C = None
        self.r: E = None
        self.x: B = None
        self.txt = txt

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

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