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

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

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

class D:
    def __init__(self, txt: str):
        self.t: H = None
        self.s: C = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.x: C = None
        self.u: A = None
        self.q: C = None
        self.z: J = None
        self.y: F = None
        self.s: D = None
        self.w: B = None
        self.o: H = None
        self.r: F = None
        self.p: D = None
        self.txt = txt

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

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

class H:
    def __init__(self, txt: str):
        self.p: E = None
        self.txt = txt

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

class J:
    def __init__(self, txt: str):
        self.x: C = None
        self.w: A = None
        self.s: I = None
        self.o: I = None
        self.y: C = None
        self.txt = txt

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.t: H = None
        self.s: C = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.x: C = None
        self.u: A = None
        self.q: C = None
        self.z: J = None
        self.y: F = None
        self.s: D = None
        self.w: B = None
        self.o: H = None
        self.r: F = None
        self.p: D = None
        self.txt = txt

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

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

class H:
    def __init__(self, txt: str):
        self.p: E = None
        self.txt = txt

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

class J:
    def __init__(self, txt: str):
        self.x: C = None
        self.w: A = None
        self.s: I = None
        self.o: I = None
        self.y: C = None
        self.txt = txt

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

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