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

class B:
    def __init__(self, txt: str):
        self.z: G = None
        self.x: D = None
        self.o: H = None
        self.w: G = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.q: B = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.q: C = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.o: E = None
        self.s: H = None
        self.w: E = None
        self.p: E = None
        self.r: E = None
        self.x: F = None
        self.txt = txt

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

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

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

class B:
    def __init__(self, txt: str):
        self.z: G = None
        self.x: D = None
        self.o: H = None
        self.w: G = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.q: B = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.q: C = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.o: E = None
        self.s: H = None
        self.w: E = None
        self.p: E = None
        self.r: E = None
        self.x: F = None
        self.txt = txt

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

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

f.t = j
j.z = k
j.w = k
j.x = a
j.o = g
n.r = g
n.o = g
n.q = g
n.x = k
n.s = h
n.v = h
n.z = f
n.u = f
a.z = g
h.q = j
i.q = n
k.o = h
k.w = h
k.p = h
k.r = h
k.s = g
k.x = i
g.z = n
g.o = f
assert j.z.w.q.z.s.txt == "g"