class A:
    def __init__(self, txt: str):
        self.z: E = None
        self.w: F = None
        self.t: J = None
        self.o: B = None
        self.y: H = None
        self.r: F = None
        self.x: G = None
        self.u: I = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.z: H = None
        self.p: J = None
        self.q: I = None
        self.x: A = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.r: I = None
        self.t: J = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.u: H = None
        self.w: F = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.w: G = None
        self.t: D = None
        self.q: C = None
        self.u: D = None
        self.r: H = None
        self.s: I = None
        self.x: A = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.s: I = None
        self.t: E = None
        self.u: I = None
        self.q: I = None
        self.o: A = None
        self.w: C = None
        self.v: H = None
        self.y: J = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.v: J = None
        self.z: I = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.p: B = None
        self.q: E = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.p: B = None
        self.t: C = None
        self.z: F = None
        self.v: F = None
        self.s: F = None
        self.u: F = None
        self.txt = txt

e = A("e")
d = B("d")
k = C("k")
b = D("b")
h = E("h")
j = F("j")
c = G("c")
m = H("m")
a = I("a")
n = J("n")

e.z = h
e.w = j
e.r = j
e.t = n
e.o = d
e.y = m
e.x = c
e.u = a
d.z = m
d.p = n
d.q = a
d.x = e
k.r = a
k.t = n
b.s = d
h.u = m
h.w = j
j.w = c
j.t = b
j.u = b
j.q = k
j.r = m
j.s = a
j.x = e
c.s = a
c.u = a
c.q = a
c.t = h
c.o = e
c.w = k
c.v = m
c.y = n
m.v = n
m.z = a
a.p = d
a.q = h
n.p = d
n.t = k
n.z = j
n.v = j
n.s = j
n.u = j
assert a.p.p.u.u.s.p.t.r.txt == "
class A:
    def __init__(self, txt: str):
        self.z: E = None
        self.w: F = None
        self.t: J = None
        self.o: B = None
        self.y: H = None
        self.r: F = None
        self.x: G = None
        self.u: I = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.z: H = None
        self.p: J = None
        self.q: I = None
        self.x: A = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.r: I = None
        self.t: J = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.u: H = None
        self.w: F = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.w: G = None
        self.t: D = None
        self.q: C = None
        self.u: D = None
        self.r: H = None
        self.s: I = None
        self.x: A = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.s: I = None
        self.t: E = None
        self.u: I = None
        self.q: I = None
        self.o: A = None
        self.w: C = None
        self.v: H = None
        self.y: J = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.v: J = None
        self.z: I = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.p: B = None
        self.q: E = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.p: B = None
        self.t: C = None
        self.z: F = None
        self.v: F = None
        self.s: F = None
        self.u: F = None
        self.txt = txt

e = A("e")
d = B("d")
k = C("k")
b = D("b")
h = E("h")
j = F("j")
c = G("c")
m = H("m")
a = I("a")
n = J("n")

e.z = h
e.w = j
e.r = j
e.t = n
e.o = d
e.y = m
e.x = c
e.u = a
d.z = m
d.p = n
d.q = a
d.x = e
k.r = a
k.t = n
b.s = d
h.u = m
h.w = j
j.w = c
j.t = b
j.u = b
j.q = k
j.r = m
j.s = a
j.x = e
c.s = a
c.u = a
c.q = a
c.t = h
c.o = e
c.w = k
c.v = m
c.y = n
m.v = n
m.z = a
a.p = d
a.q = h
n.p = d
n.t = k
n.z = j
n.v = j
n.s = j
n.u = j
assert a.p.p.u.u.s.p.t.r.txt == "a"