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

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

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

class D:
    def __init__(self, txt: str):
        self.u: F = None
        self.r: C = None
        self.y: E = None
        self.w: B = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.w: I = None
        self.q: E = None
        self.x: G = None
        self.t: I = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.v: C = None
        self.r: D = None
        self.u: C = None
        self.p: D = None
        self.t: J = None
        self.w: F = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.q: E = None
        self.p: J = None
        self.v: E = None
        self.x: C = None
        self.w: F = None
        self.o: F = None
        self.z: G = None
        self.txt = txt

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

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.u: F = None
        self.r: C = None
        self.y: E = None
        self.w: B = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.w: I = None
        self.q: E = None
        self.x: G = None
        self.t: I = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.v: C = None
        self.r: D = None
        self.u: C = None
        self.p: D = None
        self.t: J = None
        self.w: F = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.q: E = None
        self.p: J = None
        self.v: E = None
        self.x: C = None
        self.w: F = None
        self.o: F = None
        self.z: G = None
        self.txt = txt

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

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

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