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

class B:
    def __init__(self, txt: str):
        self.w: D = None
        self.z: H = None
        self.v: C = None
        self.y: F = None
        self.o: G = None
        self.q: A = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.w: D = None
        self.v: A = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.u: H = None
        self.t: C = None
        self.s: F = None
        self.o: B = None
        self.y: H = None
        self.z: H = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.p: E = None
        self.q: C = None
        self.txt = txt

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

e = A("e")
g = B("g")
a = C("a")
n = D("n")
h = E("h")
k = F("k")
l = G("l")
j = H("j")

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

class B:
    def __init__(self, txt: str):
        self.w: D = None
        self.z: H = None
        self.v: C = None
        self.y: F = None
        self.o: G = None
        self.q: A = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.w: D = None
        self.v: A = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.u: H = None
        self.t: C = None
        self.s: F = None
        self.o: B = None
        self.y: H = None
        self.z: H = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.p: E = None
        self.q: C = None
        self.txt = txt

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

e = A("e")
g = B("g")
a = C("a")
n = D("n")
h = E("h")
k = F("k")
l = G("l")
j = H("j")

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