class A:
    def __init__(self, txt: str):
        self.z: B = None
        self.o: E = None
        self.p: E = None
        self.x: D = None
        self.t: C = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.x: E = None
        self.v: A = None
        self.z: C = None
        self.r: A = None
        self.u: A = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.z: A = None
        self.o: C = None
        self.t: E = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.t: A = None
        self.z: B = None
        self.txt = txt

l = A("l")
d = B("d")
k = C("k")
j = D("j")
h = E("h")

l.z = d
l.o = h
l.p = h
l.x = j
l.t = k
d.x = h
d.v = l
d.r = l
d.u = l
d.z = k
k.v = l
k.u = l
k.p = l
k.s = j
k.q = h
j.z = l
j.o = k
j.t = h
h.t = l
h.z = d
assert d.z.p.o.txt == "
class A:
    def __init__(self, txt: str):
        self.z: B = None
        self.o: E = None
        self.p: E = None
        self.x: D = None
        self.t: C = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.x: E = None
        self.v: A = None
        self.z: C = None
        self.r: A = None
        self.u: A = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.z: A = None
        self.o: C = None
        self.t: E = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.t: A = None
        self.z: B = None
        self.txt = txt

l = A("l")
d = B("d")
k = C("k")
j = D("j")
h = E("h")

l.z = d
l.o = h
l.p = h
l.x = j
l.t = k
d.x = h
d.v = l
d.r = l
d.u = l
d.z = k
k.v = l
k.u = l
k.p = l
k.s = j
k.q = h
j.z = l
j.o = k
j.t = h
h.t = l
h.z = d
assert d.z.p.o.txt == "h"