class A:
    def __init__(self, txt: str):
        self.w: D = None
        self.t: D = None
        self.r: B = None
        self.y: D = None
        self.s: B = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.z: C = None
        self.y: C = None
        self.s: A = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.x: A = None
        self.s: C = None
        self.o: A = None
        self.txt = txt

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

k.w = l
k.t = l
k.y = l
k.r = j
k.s = j
j.z = i
j.y = i
j.s = k
i.o = m
i.z = d
i.r = k
f.v = e
f.p = d
f.z = l
e.x = k
e.o = k
e.s = i
l.v = e
l.p = d
l.z = m
m.v = d
m.p = e
m.z = l
d.x = k
d.o = k
d.s = i
assert d.s.r.s.y.z.s.z.txt == "
class A:
    def __init__(self, txt: str):
        self.w: D = None
        self.t: D = None
        self.r: B = None
        self.y: D = None
        self.s: B = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.z: C = None
        self.y: C = None
        self.s: A = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.x: A = None
        self.s: C = None
        self.o: A = None
        self.txt = txt

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

k.w = l
k.t = l
k.y = l
k.r = j
k.s = j
j.z = i
j.y = i
j.s = k
i.o = m
i.z = d
i.r = k
f.v = e
f.p = d
f.z = l
e.x = k
e.o = k
e.s = i
l.v = e
l.p = d
l.z = m
m.v = d
m.p = e
m.z = l
d.x = k
d.o = k
d.s = i
assert d.s.r.s.y.z.s.z.txt == "d"