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

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

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

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

class E:
    def __init__(self, txt: str):
        self.z: I = None
        self.p: I = None
        self.w: H = None
        self.q: G = None
        self.u: F = None
        self.t: G = None
        self.v: D = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.w: E = None
        self.s: G = None
        self.o: E = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.v: C = None
        self.q: I = None
        self.o: F = None
        self.z: G = None
        self.t: I = None
        self.y: F = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.r: E = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.u: I = None
        self.o: A = None
        self.txt = txt

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

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

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

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

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

class E:
    def __init__(self, txt: str):
        self.z: I = None
        self.p: I = None
        self.w: H = None
        self.q: G = None
        self.u: F = None
        self.t: G = None
        self.v: D = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.w: E = None
        self.s: G = None
        self.o: E = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.v: C = None
        self.q: I = None
        self.o: F = None
        self.z: G = None
        self.t: I = None
        self.y: F = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.r: E = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.u: I = None
        self.o: A = None
        self.txt = txt

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

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