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

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

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

class D:
    def __init__(self, txt: str):
        self.x: C = None
        self.q: C = None
        self.s: A = None
        self.u: E = None
        self.v: C = None
        self.txt = txt

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

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.x: C = None
        self.q: C = None
        self.s: A = None
        self.u: E = None
        self.v: C = None
        self.txt = txt

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

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

k.z = d
k.v = d
k.q = m
k.t = m
m.s = i
m.y = d
m.u = c
i.u = d
i.o = k
i.t = j
h.x = i
h.q = i
h.v = i
h.s = k
h.u = b
f.u = j
f.s = d
f.z = h
f.p = k
n.x = i
n.q = i
n.v = i
n.s = k
n.u = b
c.x = i
c.q = i
c.v = i
c.s = k
c.u = j
b.u = j
b.s = d
b.z = h
b.p = k
j.u = b
j.s = d
j.z = n
j.p = k
d.s = i
d.y = m
d.u = n
assert j.z.x.u.u.txt == "n"