class A:
    def __init__(self, txt: str):
        self.s: C = None
        self.y: J = None
        self.u: G = None
        self.txt = txt

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

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

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

class E:
    def __init__(self, txt: str):
        self.w: C = None
        self.v: F = None
        self.r: F = None
        self.q: A = None
        self.u: I = None
        self.y: H = None
        self.txt = txt

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

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

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

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

class J:
    def __init__(self, txt: str):
        self.r: A = None
        self.p: H = None
        self.q: A = None
        self.w: C = None
        self.txt = txt

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

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

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

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

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

class E:
    def __init__(self, txt: str):
        self.w: C = None
        self.v: F = None
        self.r: F = None
        self.q: A = None
        self.u: I = None
        self.y: H = None
        self.txt = txt

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

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

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

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

class J:
    def __init__(self, txt: str):
        self.r: A = None
        self.p: H = None
        self.q: A = None
        self.w: C = None
        self.txt = txt

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

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