class A:
    def __init__(self, txt: str):
        self.o: C = None
        self.q: B = None
        self.z: C = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.v: H = None
        self.z: G = None
        self.u: J = None
        self.x: H = None
        self.r: B = None
        self.q: G = None
        self.t: A = None
        self.y: J = None
        self.s: A = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.w: G = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.y: H = None
        self.t: I = None
        self.r: B = None
        self.s: I = None
        self.w: C = None
        self.p: I = None
        self.o: G = None
        self.u: D = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.x: B = None
        self.w: B = None
        self.r: B = None
        self.txt = txt

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

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

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

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

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

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

class C:
    def __init__(self, txt: str):
        self.v: H = None
        self.z: G = None
        self.u: J = None
        self.x: H = None
        self.r: B = None
        self.q: G = None
        self.t: A = None
        self.y: J = None
        self.s: A = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.w: G = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.y: H = None
        self.t: I = None
        self.r: B = None
        self.s: I = None
        self.w: C = None
        self.p: I = None
        self.o: G = None
        self.u: D = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.x: B = None
        self.w: B = None
        self.r: B = None
        self.txt = txt

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

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

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

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

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