class A:
    def __init__(self, txt: str):
        self.o: H = None
        self.q: F = None
        self.s: G = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.u: A = None
        self.v: F = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.s: I = None
        self.txt = txt

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

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

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

class G:
    def __init__(self, txt: str):
        self.s: D = None
        self.p: A = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.u: J = None
        self.z: F = None
        self.x: F = None
        self.v: D = None
        self.t: E = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.r: A = None
        self.w: E = None
        self.y: A = None
        self.z: B = None
        self.o: B = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.z: C = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.u: A = None
        self.v: F = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.s: I = None
        self.txt = txt

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

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

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

class G:
    def __init__(self, txt: str):
        self.s: D = None
        self.p: A = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.u: J = None
        self.z: F = None
        self.x: F = None
        self.v: D = None
        self.t: E = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.r: A = None
        self.w: E = None
        self.y: A = None
        self.z: B = None
        self.o: B = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.z: C = None
        self.txt = txt

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

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