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

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

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

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

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

i = A("i")
k = B("k")
g = C("g")
f = D("f")
d = E("d")
l = D("l")
a = E("a")
e = E("e")

i.v = g
i.u = e
i.q = k
i.t = f
k.s = d
g.v = l
g.q = l
g.p = k
f.w = l
f.o = d
f.v = a
f.p = i
f.t = i
d.u = l
d.z = l
d.w = e
l.w = f
l.o = e
l.v = a
l.p = i
l.t = i
a.u = l
a.z = f
a.w = d
e.u = l
e.z = l
e.w = a
assert k.s.w.z.o.w.w.txt == "
class A:
    def __init__(self, txt: str):
        self.v: C = None
        self.u: E = None
        self.q: B = None
        self.t: D = None
        self.txt = txt

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

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

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

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

i = A("i")
k = B("k")
g = C("g")
f = D("f")
d = E("d")
l = D("l")
a = E("a")
e = E("e")

i.v = g
i.u = e
i.q = k
i.t = f
k.s = d
g.v = l
g.q = l
g.p = k
f.w = l
f.o = d
f.v = a
f.p = i
f.t = i
d.u = l
d.z = l
d.w = e
l.w = f
l.o = e
l.v = a
l.p = i
l.t = i
a.u = l
a.z = f
a.w = d
e.u = l
e.z = l
e.w = a
assert k.s.w.z.o.w.w.txt == "d"