class A:
    def __init__(self, txt: str):
        self.o: J = None
        self.s: F = None
        self.w: F = None
        self.v: J = None
        self.p: D = None
        self.u: D = None
        self.y: J = None
        self.t: D = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.r: G = None
        self.u: G = None
        self.o: H = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.y: G = None
        self.o: H = None
        self.p: E = None
        self.q: A = None
        self.txt = txt

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

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

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

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

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

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

class J:
    def __init__(self, txt: str):
        self.v: D = None
        self.x: I = None
        self.q: I = None
        self.t: G = None
        self.r: D = None
        self.w: D = None
        self.z: H = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.r: G = None
        self.u: G = None
        self.o: H = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.y: G = None
        self.o: H = None
        self.p: E = None
        self.q: A = None
        self.txt = txt

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

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

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

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

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

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

class J:
    def __init__(self, txt: str):
        self.v: D = None
        self.x: I = None
        self.q: I = None
        self.t: G = None
        self.r: D = None
        self.w: D = None
        self.z: H = None
        self.txt = txt

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

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