class A:
    def __init__(self, txt: str):
        self.o: B = None
        self.v: F = None
        self.s: C = None
        self.u: F = None
        self.w: I = None
        self.q: B = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.o: D = None
        self.u: G = None
        self.x: G = None
        self.txt = txt

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

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

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

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

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

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

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

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

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

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

class C:
    def __init__(self, txt: str):
        self.o: D = None
        self.u: G = None
        self.x: G = None
        self.txt = txt

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

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

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

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

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

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

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

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

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