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

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

class C:
    def __init__(self, txt: str):
        self.q: E = None
        self.u: E = None
        self.r: D = None
        self.txt = txt

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

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

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

j.z = h
j.x = h
j.o = e
j.t = e
j.u = d
m.u = e
m.o = e
m.r = d
l.q = d
l.u = d
l.r = n
n.y = e
f.x = e
f.o = d
f.t = d
f.z = l
d.x = m
d.o = f
d.t = f
d.z = l
g.z = c
g.o = m
g.t = m
g.x = h
g.u = d
e.u = m
e.o = m
e.r = d
c.y = m
h.y = m
assert n.y.r.x.o.txt == "
class A:
    def __init__(self, txt: str):
        self.z: D = None
        self.o: B = None
        self.x: D = None
        self.t: B = None
        self.u: E = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.q: E = None
        self.u: E = None
        self.r: D = None
        self.txt = txt

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

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

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

j.z = h
j.x = h
j.o = e
j.t = e
j.u = d
m.u = e
m.o = e
m.r = d
l.q = d
l.u = d
l.r = n
n.y = e
f.x = e
f.o = d
f.t = d
f.z = l
d.x = m
d.o = f
d.t = f
d.z = l
g.z = c
g.o = m
g.t = m
g.x = h
g.u = d
e.u = m
e.o = m
e.r = d
c.y = m
h.y = m
assert n.y.r.x.o.txt == "e"