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

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

class C:
    def __init__(self, txt: str):
        self.w: D = None
        self.u: B = None
        self.s: D = None
        self.o: E = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.z: C = None
        self.p: A = None
        self.s: C = None
        self.r: C = None
        self.v: A = None
        self.txt = txt

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

j = A("j")
n = B("n")
l = C("l")
i = D("i")
f = E("f")
k = B("k")

j.t = i
j.r = i
j.v = f
n.r = l
n.w = l
l.w = i
l.s = i
l.u = n
l.o = f
i.z = l
i.s = l
i.r = l
i.p = j
i.v = j
f.z = j
f.w = j
f.s = k
f.q = k
k.r = l
k.w = l
assert l.o.z.v.q.r.s.txt == "
class A:
    def __init__(self, txt: str):
        self.t: D = None
        self.r: D = None
        self.v: E = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.w: D = None
        self.u: B = None
        self.s: D = None
        self.o: E = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.z: C = None
        self.p: A = None
        self.s: C = None
        self.r: C = None
        self.v: A = None
        self.txt = txt

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

j = A("j")
n = B("n")
l = C("l")
i = D("i")
f = E("f")
k = B("k")

j.t = i
j.r = i
j.v = f
n.r = l
n.w = l
l.w = i
l.s = i
l.u = n
l.o = f
i.z = l
i.s = l
i.r = l
i.p = j
i.v = j
f.z = j
f.w = j
f.s = k
f.q = k
k.r = l
k.w = l
assert l.o.z.v.q.r.s.txt == "i"