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

class B:
    def __init__(self, txt: str):
        self.o: J = None
        self.y: A = None
        self.z: F = None
        self.v: I = None
        self.x: I = None
        self.t: D = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.s: J = None
        self.w: B = None
        self.o: I = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.r: B = None
        self.q: D = None
        self.x: J = None
        self.u: J = None
        self.w: J = None
        self.p: A = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.s: C = None
        self.x: F = None
        self.z: D = None
        self.o: F = None
        self.u: I = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.z: F = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.q: D = None
        self.z: H = None
        self.v: D = None
        self.o: E = None
        self.u: H = None
        self.txt = txt

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

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

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

class B:
    def __init__(self, txt: str):
        self.o: J = None
        self.y: A = None
        self.z: F = None
        self.v: I = None
        self.x: I = None
        self.t: D = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.s: J = None
        self.w: B = None
        self.o: I = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.r: B = None
        self.q: D = None
        self.x: J = None
        self.u: J = None
        self.w: J = None
        self.p: A = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.s: C = None
        self.x: F = None
        self.z: D = None
        self.o: F = None
        self.u: I = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.z: F = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.q: D = None
        self.z: H = None
        self.v: D = None
        self.o: E = None
        self.u: H = None
        self.txt = txt

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

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

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