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

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

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

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

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

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

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

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

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

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

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

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

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

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

m.z = c
m.s = b
m.u = h
m.p = h
m.x = k
k.z = e
l.w = a
l.r = m
b.v = m
b.q = m
b.t = c
b.u = k
c.s = h
c.v = k
h.x = b
h.v = k
e.w = b
e.r = m
n.w = b
n.r = m
a.v = m
a.q = m
a.t = c
a.u = k
f.w = a
f.r = m
assert a.t.v.z.txt == "e"