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

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

class C:
    def __init__(self, txt: str):
        self.p: B = None
        self.x: E = None
        self.s: D = None
        self.w: E = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.p: B = None
        self.x: C = None
        self.o: D = None
        self.v: C = None
        self.r: C = None
        self.txt = txt

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

e = A("e")
m = B("m")
g = C("g")
n = D("n")
b = E("b")
i = D("i")
d = E("d")
k = B("k")
a = A("a")
c = A("c")

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

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

class C:
    def __init__(self, txt: str):
        self.p: B = None
        self.x: E = None
        self.s: D = None
        self.w: E = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.p: B = None
        self.x: C = None
        self.o: D = None
        self.v: C = None
        self.r: C = None
        self.txt = txt

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

e = A("e")
m = B("m")
g = C("g")
n = D("n")
b = E("b")
i = D("i")
d = E("d")
k = B("k")
a = A("a")
c = A("c")

e.u = b
m.q = i
g.p = m
g.x = b
g.s = n
g.w = d
n.p = m
n.x = g
n.v = g
n.r = g
n.o = i
b.z = m
b.x = g
b.y = k
i.p = k
i.x = g
i.v = g
i.r = g
i.o = n
d.z = m
d.y = m
d.x = g
k.q = n
a.u = d
c.u = d
assert c.u.y.q.x.p.q.txt == "i"