class A:
    def __init__(self, txt: str):
        self.u: E = None
        self.q: E = None
        self.x: E = None
        self.r: E = None
        self.s: D = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.x: E = None
        self.txt = txt

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

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

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

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

b.u = k
b.q = k
b.r = k
b.x = i
b.s = h
m.x = k
f.q = i
h.u = m
h.z = m
i.o = m
i.u = k
i.y = k
e.u = k
e.q = k
e.x = i
e.r = i
e.s = h
k.o = m
k.u = i
k.y = i
a.u = m
a.z = m
assert f.q.y.o.x.y.u.u.txt == "
class A:
    def __init__(self, txt: str):
        self.u: E = None
        self.q: E = None
        self.x: E = None
        self.r: E = None
        self.s: D = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.x: E = None
        self.txt = txt

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

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

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

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

b.u = k
b.q = k
b.r = k
b.x = i
b.s = h
m.x = k
f.q = i
h.u = m
h.z = m
i.o = m
i.u = k
i.y = k
e.u = k
e.q = k
e.x = i
e.r = i
e.s = h
k.o = m
k.u = i
k.y = i
a.u = m
a.z = m
assert f.q.y.o.x.y.u.u.txt == "i"