class A:
    def __init__(self, txt: str):
        self.x: E = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.r: J = None
        self.s: J = None
        self.q: A = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.x: B = None
        self.r: F = None
        self.z: F = None
        self.v: A = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.u: E = None
        self.p: G = None
        self.x: E = None
        self.s: F = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.o: H = None
        self.p: D = None
        self.s: E = None
        self.z: I = None
        self.u: D = None
        self.t: H = None
        self.y: D = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.u: G = None
        self.p: D = None
        self.o: E = None
        self.z: G = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.p: D = None
        self.z: J = None
        self.y: F = None
        self.s: E = None
        self.u: H = None
        self.o: F = None
        self.q: E = None
        self.w: B = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.q: A = None
        self.o: E = None
        self.y: F = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.r: J = None
        self.s: J = None
        self.q: A = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.x: B = None
        self.r: F = None
        self.z: F = None
        self.v: A = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.u: E = None
        self.p: G = None
        self.x: E = None
        self.s: F = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.o: H = None
        self.p: D = None
        self.s: E = None
        self.z: I = None
        self.u: D = None
        self.t: H = None
        self.y: D = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.u: G = None
        self.p: D = None
        self.o: E = None
        self.z: G = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.p: D = None
        self.z: J = None
        self.y: F = None
        self.s: E = None
        self.u: H = None
        self.o: F = None
        self.q: E = None
        self.w: B = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.q: A = None
        self.o: E = None
        self.y: F = None
        self.txt = txt

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

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