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

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

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

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

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

j = A("j")
e = B("e")
f = C("f")
i = D("i")
d = E("d")
g = C("g")
l = B("l")
c = D("c")
n = E("n")

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

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

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

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

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

j = A("j")
e = B("e")
f = C("f")
i = D("i")
d = E("d")
g = C("g")
l = B("l")
c = D("c")
n = E("n")

j.x = g
j.u = f
j.s = l
e.w = f
e.y = n
e.s = g
f.z = e
f.r = j
f.s = j
f.x = g
i.v = g
i.p = g
i.u = n
d.t = n
d.u = n
d.r = c
d.o = c
d.w = g
g.z = l
g.r = j
g.s = j
g.x = f
l.w = g
l.s = g
l.y = d
c.v = g
c.p = g
c.u = d
n.t = d
n.u = d
n.r = i
n.o = i
n.w = g
assert d.u.w.z.y.u.w.z.y.txt == "d"