class A:
    def __init__(self, txt: str):
        self.s: B = None
        self.u: A = None
        self.p: A = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.v: C = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.y: A = None
        self.t: A = None
        self.u: D = None
        self.p: E = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.z: B = None
        self.w: E = None
        self.y: E = None
        self.o: B = None
        self.r: E = None
        self.txt = txt

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

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

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

class B:
    def __init__(self, txt: str):
        self.v: C = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.y: A = None
        self.t: A = None
        self.u: D = None
        self.p: E = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.z: B = None
        self.w: E = None
        self.y: E = None
        self.o: B = None
        self.r: E = None
        self.txt = txt

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

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

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