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

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

class C:
    def __init__(self, txt: str):
        self.w: D = None
        self.x: F = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.z: E = None
        self.o: I = None
        self.s: A = None
        self.q: G = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.t: C = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.q: E = None
        self.z: J = None
        self.p: J = None
        self.y: F = None
        self.r: H = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.s: D = None
        self.r: B = None
        self.y: B = None
        self.w: H = None
        self.u: H = None
        self.z: G = None
        self.v: F = None
        self.x: B = None
        self.p: H = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.q: G = None
        self.y: E = None
        self.s: G = None
        self.p: H = None
        self.txt = txt

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

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

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

class C:
    def __init__(self, txt: str):
        self.w: D = None
        self.x: F = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.z: E = None
        self.o: I = None
        self.s: A = None
        self.q: G = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.t: C = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.q: E = None
        self.z: J = None
        self.p: J = None
        self.y: F = None
        self.r: H = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.s: D = None
        self.r: B = None
        self.y: B = None
        self.w: H = None
        self.u: H = None
        self.z: G = None
        self.v: F = None
        self.x: B = None
        self.p: H = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.q: G = None
        self.y: E = None
        self.s: G = None
        self.p: H = None
        self.txt = txt

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

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