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

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

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

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

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

e = A("e")
i = B("i")
a = C("a")
h = D("h")
c = E("c")
l = C("l")
n = B("n")
m = A("m")
j = A("j")

e.y = a
e.u = c
e.o = i
i.r = h
i.x = h
a.v = n
a.w = c
a.z = h
a.s = l
h.q = i
c.p = l
l.v = n
l.w = c
l.z = h
l.s = a
n.r = h
n.x = h
m.y = a
m.u = c
m.o = i
j.y = l
j.u = c
j.o = n
assert e.y.s.v.r.q.txt == "
class A:
    def __init__(self, txt: str):
        self.y: C = None
        self.u: E = None
        self.o: B = None
        self.txt = txt

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

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

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

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

e = A("e")
i = B("i")
a = C("a")
h = D("h")
c = E("c")
l = C("l")
n = B("n")
m = A("m")
j = A("j")

e.y = a
e.u = c
e.o = i
i.r = h
i.x = h
a.v = n
a.w = c
a.z = h
a.s = l
h.q = i
c.p = l
l.v = n
l.w = c
l.z = h
l.s = a
n.r = h
n.x = h
m.y = a
m.u = c
m.o = i
j.y = l
j.u = c
j.o = n
assert e.y.s.v.r.q.txt == "i"