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

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

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

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

class E:
    def __init__(self, txt: str):
        self.z: A = None
        self.u: B = None
        self.p: A = None
        self.o: D = None
        self.x: B = None
        self.txt = txt

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

m.u = l
m.t = k
m.y = d
m.p = d
k.x = e
k.w = m
k.u = h
k.t = n
l.t = i
l.s = k
b.y = d
b.x = d
b.t = d
b.o = i
b.u = h
d.z = m
d.p = m
d.u = a
d.o = b
d.x = k
n.x = a
n.t = a
n.w = m
n.u = h
a.x = e
a.w = m
a.u = h
a.t = n
i.t = l
i.s = n
h.y = d
h.x = d
h.t = d
h.o = l
h.u = b
e.x = k
e.w = m
e.u = b
e.t = n
assert n.w.p.x.u.t.txt == "
class A:
    def __init__(self, txt: str):
        self.u: C = None
        self.t: B = None
        self.y: E = None
        self.p: E = None
        self.txt = txt

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

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

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

class E:
    def __init__(self, txt: str):
        self.z: A = None
        self.u: B = None
        self.p: A = None
        self.o: D = None
        self.x: B = None
        self.txt = txt

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

m.u = l
m.t = k
m.y = d
m.p = d
k.x = e
k.w = m
k.u = h
k.t = n
l.t = i
l.s = k
b.y = d
b.x = d
b.t = d
b.o = i
b.u = h
d.z = m
d.p = m
d.u = a
d.o = b
d.x = k
n.x = a
n.t = a
n.w = m
n.u = h
a.x = e
a.w = m
a.u = h
a.t = n
i.t = l
i.s = n
h.y = d
h.x = d
h.t = d
h.o = l
h.u = b
e.x = k
e.w = m
e.u = b
e.t = n
assert n.w.p.x.u.t.txt == "d"