class A:
    def __init__(self, txt: str):
        self.s: F = None
        self.t: D = None
        self.p: F = None
        self.r: H = None
        self.x: H = None
        self.txt = txt

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

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

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

class E:
    def __init__(self, txt: str):
        self.x: A = None
        self.txt = txt

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

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

class H:
    def __init__(self, txt: str):
        self.s: A = None
        self.w: B = None
        self.r: F = None
        self.z: G = None
        self.t: E = None
        self.x: B = None
        self.txt = txt

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

e.s = k
e.p = k
e.t = a
e.r = h
e.x = h
f.o = e
f.x = n
m.x = a
m.z = e
m.y = e
m.t = f
m.s = h
m.o = h
a.o = m
b.x = e
k.q = f
n.r = b
n.v = f
n.u = f
n.s = d
h.s = e
h.w = f
h.x = f
h.r = k
h.z = n
h.t = b
l.o = e
l.x = d
d.r = b
d.v = l
d.u = l
d.s = n
assert a.o.z.s.q.txt == "
class A:
    def __init__(self, txt: str):
        self.s: F = None
        self.t: D = None
        self.p: F = None
        self.r: H = None
        self.x: H = None
        self.txt = txt

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

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

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

class E:
    def __init__(self, txt: str):
        self.x: A = None
        self.txt = txt

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

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

class H:
    def __init__(self, txt: str):
        self.s: A = None
        self.w: B = None
        self.r: F = None
        self.z: G = None
        self.t: E = None
        self.x: B = None
        self.txt = txt

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

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