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

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

class C:
    def __init__(self, txt: str):
        self.p: I = None
        self.u: D = None
        self.y: E = None
        self.q: D = None
        self.v: E = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.y: C = None
        self.t: D = None
        self.o: H = None
        self.w: A = None
        self.q: I = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.o: B = None
        self.r: I = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.q: C = None
        self.t: D = None
        self.o: A = None
        self.r: J = None
        self.p: F = None
        self.y: J = None
        self.z: D = None
        self.v: G = None
        self.u: C = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.t: E = None
        self.r: E = None
        self.x: B = None
        self.w: C = None
        self.y: C = None
        self.u: B = None
        self.z: G = None
        self.o: A = None
        self.txt = txt

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

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

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

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

class C:
    def __init__(self, txt: str):
        self.p: I = None
        self.u: D = None
        self.y: E = None
        self.q: D = None
        self.v: E = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.y: C = None
        self.t: D = None
        self.o: H = None
        self.w: A = None
        self.q: I = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.o: B = None
        self.r: I = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.q: C = None
        self.t: D = None
        self.o: A = None
        self.r: J = None
        self.p: F = None
        self.y: J = None
        self.z: D = None
        self.v: G = None
        self.u: C = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.t: E = None
        self.r: E = None
        self.x: B = None
        self.w: C = None
        self.y: C = None
        self.u: B = None
        self.z: G = None
        self.o: A = None
        self.txt = txt

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

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

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