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

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

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

class D:
    def __init__(self, txt: str):
        self.x: I = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.t: A = None
        self.q: C = None
        self.p: F = None
        self.w: D = None
        self.u: H = None
        self.txt = txt

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

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

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

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

class J:
    def __init__(self, txt: str):
        self.p: B = None
        self.u: G = None
        self.txt = txt

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.x: I = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.t: A = None
        self.q: C = None
        self.p: F = None
        self.w: D = None
        self.u: H = None
        self.txt = txt

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

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

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

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

class J:
    def __init__(self, txt: str):
        self.p: B = None
        self.u: G = None
        self.txt = txt

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

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