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

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

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

class D:
    def __init__(self, txt: str):
        self.t: A = None
        self.v: B = None
        self.u: A = None
        self.o: B = None
        self.w: D = None
        self.txt = txt

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

e = A("e")
l = B("l")
k = C("k")
m = D("m")
h = E("h")
i = D("i")
d = C("d")
f = B("f")
j = E("j")
c = E("c")

e.p = i
l.v = e
l.y = e
l.q = j
k.r = m
k.x = f
k.u = l
k.z = d
k.w = i
m.t = e
m.u = e
m.v = l
m.o = f
m.w = i
h.y = l
i.t = e
i.u = e
i.v = l
i.o = l
i.w = m
d.r = i
d.w = i
d.x = f
d.u = f
d.z = k
f.v = e
f.y = e
f.q = h
j.y = f
c.y = f
assert h.y.q.y.y.p.v.y.p.w.txt == "
class A:
    def __init__(self, txt: str):
        self.p: D = None
        self.txt = txt

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

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

class D:
    def __init__(self, txt: str):
        self.t: A = None
        self.v: B = None
        self.u: A = None
        self.o: B = None
        self.w: D = None
        self.txt = txt

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

e = A("e")
l = B("l")
k = C("k")
m = D("m")
h = E("h")
i = D("i")
d = C("d")
f = B("f")
j = E("j")
c = E("c")

e.p = i
l.v = e
l.y = e
l.q = j
k.r = m
k.x = f
k.u = l
k.z = d
k.w = i
m.t = e
m.u = e
m.v = l
m.o = f
m.w = i
h.y = l
i.t = e
i.u = e
i.v = l
i.o = l
i.w = m
d.r = i
d.w = i
d.x = f
d.u = f
d.z = k
f.v = e
f.y = e
f.q = h
j.y = f
c.y = f
assert h.y.q.y.y.p.v.y.p.w.txt == "m"