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

class B:
    def __init__(self, txt: str):
        self.q: H = None
        self.p: A = None
        self.v: G = None
        self.x: C = None
        self.u: E = None
        self.y: E = None
        self.txt = txt

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

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

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

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

class G:
    def __init__(self, txt: str):
        self.s: F = None
        self.v: H = None
        self.x: H = None
        self.txt = txt

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

j = A("j")
c = B("c")
h = C("h")
f = D("f")
g = E("g")
e = F("e")
m = G("m")
k = H("k")

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

class B:
    def __init__(self, txt: str):
        self.q: H = None
        self.p: A = None
        self.v: G = None
        self.x: C = None
        self.u: E = None
        self.y: E = None
        self.txt = txt

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

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

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

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

class G:
    def __init__(self, txt: str):
        self.s: F = None
        self.v: H = None
        self.x: H = None
        self.txt = txt

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

j = A("j")
c = B("c")
h = C("h")
f = D("f")
g = E("g")
e = F("e")
m = G("m")
k = H("k")

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