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

class B:
    def __init__(self, txt: str):
        self.s: G = None
        self.y: D = None
        self.x: J = None
        self.p: I = None
        self.t: E = None
        self.v: E = None
        self.q: C = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.t: A = None
        self.x: B = None
        self.o: J = None
        self.q: D = None
        self.z: F = None
        self.v: G = None
        self.r: E = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.r: E = None
        self.p: F = None
        self.o: G = None
        self.t: A = None
        self.x: B = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.z: E = None
        self.x: E = None
        self.s: H = None
        self.w: H = None
        self.y: I = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.q: H = None
        self.p: E = None
        self.w: A = None
        self.u: B = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.q: I = None
        self.v: F = None
        self.s: C = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.s: G = None
        self.y: D = None
        self.x: J = None
        self.p: I = None
        self.t: E = None
        self.v: E = None
        self.q: C = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.t: A = None
        self.x: B = None
        self.o: J = None
        self.q: D = None
        self.z: F = None
        self.v: G = None
        self.r: E = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.r: E = None
        self.p: F = None
        self.o: G = None
        self.t: A = None
        self.x: B = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.z: E = None
        self.x: E = None
        self.s: H = None
        self.w: H = None
        self.y: I = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.q: H = None
        self.p: E = None
        self.w: A = None
        self.u: B = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.q: I = None
        self.v: F = None
        self.s: C = None
        self.txt = txt

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

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