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

class B:
    def __init__(self, txt: str):
        self.w: F = None
        self.r: D = None
        self.t: F = None
        self.v: H = None
        self.u: H = None
        self.o: J = None
        self.z: C = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.w: A = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.t: I = None
        self.p: D = None
        self.s: J = None
        self.y: C = None
        self.u: J = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.v: I = None
        self.u: E = None
        self.x: C = None
        self.o: C = None
        self.z: A = None
        self.y: J = None
        self.q: E = None
        self.t: I = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.u: J = None
        self.w: C = None
        self.x: E = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.y: B = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.w: F = None
        self.r: D = None
        self.t: F = None
        self.v: H = None
        self.u: H = None
        self.o: J = None
        self.z: C = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.w: A = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.t: I = None
        self.p: D = None
        self.s: J = None
        self.y: C = None
        self.u: J = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.v: I = None
        self.u: E = None
        self.x: C = None
        self.o: C = None
        self.z: A = None
        self.y: J = None
        self.q: E = None
        self.t: I = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.u: J = None
        self.w: C = None
        self.x: E = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.y: B = None
        self.txt = txt

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

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