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

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

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

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

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

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

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

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

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

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

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

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

m.q = b
m.v = l
m.o = l
c.p = a
b.y = m
b.z = f
b.x = a
d.v = h
d.z = b
d.w = f
d.y = f
d.s = l
f.u = k
f.w = c
f.s = c
f.v = b
a.v = d
a.z = g
a.w = f
a.s = f
a.y = l
h.v = d
h.z = g
h.w = l
h.s = l
h.y = f
l.u = k
l.w = c
l.s = c
l.v = b
g.y = m
g.z = l
g.x = h
k.q = b
k.v = f
k.o = l
assert b.x.s.u.o.u.txt == "k"