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

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

class C:
    def __init__(self, txt: str):
        self.z: E = None
        self.y: B = None
        self.o: A = None
        self.p: F = None
        self.r: F = None
        self.txt = txt

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

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

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

e = A("e")
l = B("l")
k = C("k")
n = D("n")
i = E("i")
h = F("h")

e.w = l
e.z = n
e.y = h
e.p = h
l.z = e
l.w = e
l.u = n
k.z = i
k.y = l
k.o = e
k.p = h
k.r = h
n.t = l
n.v = k
i.x = l
i.v = l
i.z = k
i.q = h
h.w = l
h.o = l
h.t = i
assert h.o.z.z.t.txt == "
class A:
    def __init__(self, txt: str):
        self.w: B = None
        self.z: D = None
        self.y: F = None
        self.p: F = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.z: E = None
        self.y: B = None
        self.o: A = None
        self.p: F = None
        self.r: F = None
        self.txt = txt

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

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

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

e = A("e")
l = B("l")
k = C("k")
n = D("n")
i = E("i")
h = F("h")

e.w = l
e.z = n
e.y = h
e.p = h
l.z = e
l.w = e
l.u = n
k.z = i
k.y = l
k.o = e
k.p = h
k.r = h
n.t = l
n.v = k
i.x = l
i.v = l
i.z = k
i.q = h
h.w = l
h.o = l
h.t = i
assert h.o.z.z.t.txt == "l"