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

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

class C:
    def __init__(self, txt: str):
        self.t: B = None
        self.w: D = None
        self.q: A = None
        self.y: E = None
        self.u: B = None
        self.txt = txt

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

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

l = A("l")
b = B("b")
i = C("i")
g = D("g")
m = E("m")
h = E("h")
j = E("j")
a = B("a")
d = A("d")
k = D("k")

l.w = i
l.r = i
l.s = g
l.q = g
l.y = a
b.v = i
i.t = b
i.u = b
i.w = k
i.q = l
i.y = m
g.o = j
g.u = l
g.p = k
m.w = d
m.o = j
m.r = j
m.y = l
h.w = l
h.y = l
h.o = j
h.r = m
j.w = l
j.o = h
j.y = d
j.r = m
a.v = i
d.w = i
d.r = i
d.s = k
d.q = g
d.y = b
k.o = j
k.u = l
k.p = g
assert m.r.y.s.o.r.o.w.r.t.txt == "
class A:
    def __init__(self, txt: str):
        self.w: C = None
        self.s: D = None
        self.q: D = None
        self.r: C = None
        self.y: B = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.t: B = None
        self.w: D = None
        self.q: A = None
        self.y: E = None
        self.u: B = None
        self.txt = txt

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

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

l = A("l")
b = B("b")
i = C("i")
g = D("g")
m = E("m")
h = E("h")
j = E("j")
a = B("a")
d = A("d")
k = D("k")

l.w = i
l.r = i
l.s = g
l.q = g
l.y = a
b.v = i
i.t = b
i.u = b
i.w = k
i.q = l
i.y = m
g.o = j
g.u = l
g.p = k
m.w = d
m.o = j
m.r = j
m.y = l
h.w = l
h.y = l
h.o = j
h.r = m
j.w = l
j.o = h
j.y = d
j.r = m
a.v = i
d.w = i
d.r = i
d.s = k
d.q = g
d.y = b
k.o = j
k.u = l
k.p = g
assert m.r.y.s.o.r.o.w.r.t.txt == "b"