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

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

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

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

class E:
    def __init__(self, txt: str):
        self.r: A = None
        self.o: B = None
        self.x: B = None
        self.w: D = None
        self.txt = txt

k = A("k")
e = B("e")
g = C("g")
n = D("n")
a = E("a")
d = E("d")
i = D("i")
m = B("m")
b = D("b")

k.u = g
k.x = e
k.s = e
k.p = d
k.v = a
e.o = k
e.q = k
e.z = m
e.p = g
e.y = a
g.q = a
g.z = d
g.x = m
g.v = e
g.r = k
n.o = k
n.w = k
n.u = d
n.x = g
a.r = k
a.o = e
a.x = e
a.w = n
d.r = k
d.o = m
d.x = e
d.w = i
i.o = k
i.w = k
i.u = d
i.x = g
m.o = k
m.q = k
m.z = e
m.p = g
m.y = a
b.o = k
b.w = k
b.u = a
b.x = g
assert d.w.o.u.r.s.p.z.txt == "
class A:
    def __init__(self, txt: str):
        self.u: C = None
        self.x: B = None
        self.p: E = None
        self.s: B = None
        self.v: E = None
        self.txt = txt

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

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

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

class E:
    def __init__(self, txt: str):
        self.r: A = None
        self.o: B = None
        self.x: B = None
        self.w: D = None
        self.txt = txt

k = A("k")
e = B("e")
g = C("g")
n = D("n")
a = E("a")
d = E("d")
i = D("i")
m = B("m")
b = D("b")

k.u = g
k.x = e
k.s = e
k.p = d
k.v = a
e.o = k
e.q = k
e.z = m
e.p = g
e.y = a
g.q = a
g.z = d
g.x = m
g.v = e
g.r = k
n.o = k
n.w = k
n.u = d
n.x = g
a.r = k
a.o = e
a.x = e
a.w = n
d.r = k
d.o = m
d.x = e
d.w = i
i.o = k
i.w = k
i.u = d
i.x = g
m.o = k
m.q = k
m.z = e
m.p = g
m.y = a
b.o = k
b.w = k
b.u = a
b.x = g
assert d.w.o.u.r.s.p.z.txt == "d"