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

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

class C:
    def __init__(self, txt: str):
        self.y: C = None
        self.r: E = None
        self.p: C = None
        self.txt = txt

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

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

e = A("e")
c = B("c")
i = C("i")
f = D("f")
b = E("b")
d = E("d")
a = C("a")
h = A("h")
l = A("l")
m = D("m")

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

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

class C:
    def __init__(self, txt: str):
        self.y: C = None
        self.r: E = None
        self.p: C = None
        self.txt = txt

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

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

e = A("e")
c = B("c")
i = C("i")
f = D("f")
b = E("b")
d = E("d")
a = C("a")
h = A("h")
l = A("l")
m = D("m")

e.r = a
e.v = d
e.t = c
c.r = l
c.p = f
c.t = f
c.w = e
i.y = a
i.p = a
i.r = d
f.p = l
f.o = e
f.s = a
f.u = a
f.r = c
b.s = d
b.x = i
b.u = l
b.z = h
d.s = b
d.x = i
d.u = e
d.z = h
a.y = i
a.p = i
a.r = d
h.r = a
h.v = b
h.t = c
l.r = i
l.v = d
l.t = c
m.p = l
m.o = l
m.s = a
m.r = c
m.u = i
assert m.u.r.u.t.w.v.txt == "d"