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

class B:
    def __init__(self, txt: str):
        self.w: C = None
        self.q: A = None
        self.p: E = None
        self.txt = txt

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

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

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

j = A("j")
k = B("k")
m = C("m")
f = D("f")
e = E("e")

j.z = k
j.u = m
j.y = f
j.p = e
k.w = m
k.q = j
k.p = e
m.s = k
m.w = k
m.r = e
m.v = j
m.t = j
f.v = k
e.z = m
e.v = f
e.w = j
assert m.t.p.v.txt == "
class A:
    def __init__(self, txt: str):
        self.z: B = None
        self.u: C = None
        self.y: D = None
        self.p: E = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.w: C = None
        self.q: A = None
        self.p: E = None
        self.txt = txt

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

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

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

j = A("j")
k = B("k")
m = C("m")
f = D("f")
e = E("e")

j.z = k
j.u = m
j.y = f
j.p = e
k.w = m
k.q = j
k.p = e
m.s = k
m.w = k
m.r = e
m.v = j
m.t = j
f.v = k
e.z = m
e.v = f
e.w = j
assert m.t.p.v.txt == "f"