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

class B:
    def __init__(self, txt: str):
        self.q: E = None
        self.z: B = None
        self.v: A = None
        self.s: D = None
        self.txt = txt

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

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

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

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

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

class B:
    def __init__(self, txt: str):
        self.q: E = None
        self.z: B = None
        self.v: A = None
        self.s: D = None
        self.txt = txt

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

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

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

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

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