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

class B:
    def __init__(self, txt: str):
        self.x: D = None
        self.t: A = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.u: B = None
        self.z: E = None
        self.q: B = None
        self.p: E = None
        self.x: D = None
        self.txt = txt

m = A("m")
f = B("f")
g = C("g")
l = D("l")
i = E("i")
d = A("d")
k = D("k")
c = E("c")
b = C("b")

m.r = g
m.u = f
m.p = f
m.o = b
m.z = k
f.x = k
f.t = d
g.r = m
g.o = c
g.q = i
g.v = f
l.y = c
l.u = f
i.u = f
i.q = f
i.z = c
i.p = c
i.x = l
d.r = g
d.u = f
d.p = f
d.o = b
d.z = k
k.y = i
k.u = f
c.u = f
c.q = f
c.z = i
c.p = i
c.x = l
b.r = m
b.o = c
b.q = c
b.v = f
assert l.y.u.t.o.r.u.x.u.t.txt == "
class A:
    def __init__(self, txt: str):
        self.r: C = None
        self.u: B = None
        self.o: C = None
        self.p: B = None
        self.z: D = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.x: D = None
        self.t: A = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.u: B = None
        self.z: E = None
        self.q: B = None
        self.p: E = None
        self.x: D = None
        self.txt = txt

m = A("m")
f = B("f")
g = C("g")
l = D("l")
i = E("i")
d = A("d")
k = D("k")
c = E("c")
b = C("b")

m.r = g
m.u = f
m.p = f
m.o = b
m.z = k
f.x = k
f.t = d
g.r = m
g.o = c
g.q = i
g.v = f
l.y = c
l.u = f
i.u = f
i.q = f
i.z = c
i.p = c
i.x = l
d.r = g
d.u = f
d.p = f
d.o = b
d.z = k
k.y = i
k.u = f
c.u = f
c.q = f
c.z = i
c.p = i
c.x = l
b.r = m
b.o = c
b.q = c
b.v = f
assert l.y.u.t.o.r.u.x.u.t.txt == "d"