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

class B:
    def __init__(self, txt: str):
        self.u: C = None
        self.w: E = None
        self.s: A = None
        self.z: C = None
        self.q: C = None
        self.o: A = None
        self.y: A = None
        self.v: G = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.w: D = None
        self.y: D = None
        self.p: G = None
        self.t: D = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.t: A = None
        self.r: E = None
        self.v: B = None
        self.u: A = None
        self.z: D = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.r: B = None
        self.txt = txt

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

a = A("a")
k = B("k")
d = C("d")
m = D("m")
e = E("e")
g = F("g")
l = G("l")
f = H("f")
b = E("b")

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

class B:
    def __init__(self, txt: str):
        self.u: C = None
        self.w: E = None
        self.s: A = None
        self.z: C = None
        self.q: C = None
        self.o: A = None
        self.y: A = None
        self.v: G = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.w: D = None
        self.y: D = None
        self.p: G = None
        self.t: D = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.t: A = None
        self.r: E = None
        self.v: B = None
        self.u: A = None
        self.z: D = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.r: B = None
        self.txt = txt

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

a = A("a")
k = B("k")
d = C("d")
m = D("m")
e = E("e")
g = F("g")
l = G("l")
f = H("f")
b = E("b")

a.t = l
a.r = k
k.u = d
k.z = d
k.q = d
k.w = e
k.s = a
k.o = a
k.y = a
k.v = l
d.z = g
m.y = a
m.t = a
m.u = d
m.r = d
m.s = g
e.w = m
e.y = m
e.t = m
e.p = l
g.t = a
g.u = a
g.r = e
g.v = k
g.z = m
l.r = k
f.o = d
f.u = g
b.w = m
b.y = m
b.t = m
b.p = l
assert f.u.z.s.txt == "g"