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

class B:
    def __init__(self, txt: str):
        self.s: D = None
        self.x: C = None
        self.v: G = None
        self.y: F = None
        self.u: C = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.x: A = None
        self.v: H = None
        self.o: E = None
        self.y: E = None
        self.u: F = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.x: E = None
        self.o: C = None
        self.y: C = None
        self.u: G = None
        self.s: B = None
        self.w: E = None
        self.t: B = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.s: B = None
        self.q: B = None
        self.z: I = None
        self.txt = txt

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

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

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

class J:
    def __init__(self, txt: str):
        self.t: E = None
        self.w: B = None
        self.z: B = None
        self.s: B = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.s: D = None
        self.x: C = None
        self.v: G = None
        self.y: F = None
        self.u: C = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.x: A = None
        self.v: H = None
        self.o: E = None
        self.y: E = None
        self.u: F = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.x: E = None
        self.o: C = None
        self.y: C = None
        self.u: G = None
        self.s: B = None
        self.w: E = None
        self.t: B = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.s: B = None
        self.q: B = None
        self.z: I = None
        self.txt = txt

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

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

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

class J:
    def __init__(self, txt: str):
        self.t: E = None
        self.w: B = None
        self.z: B = None
        self.s: B = None
        self.txt = txt

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

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