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

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

class C:
    def __init__(self, txt: str):
        self.p: D = None
        self.x: B = None
        self.y: B = None
        self.t: D = None
        self.o: B = None
        self.w: B = None
        self.u: F = None
        self.z: G = None
        self.txt = txt

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

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

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

class G:
    def __init__(self, txt: str):
        self.y: D = None
        self.z: C = None
        self.t: B = None
        self.q: D = None
        self.r: D = None
        self.v: C = None
        self.w: D = None
        self.txt = txt

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

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

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

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

class C:
    def __init__(self, txt: str):
        self.p: D = None
        self.x: B = None
        self.y: B = None
        self.t: D = None
        self.o: B = None
        self.w: B = None
        self.u: F = None
        self.z: G = None
        self.txt = txt

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

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

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

class G:
    def __init__(self, txt: str):
        self.y: D = None
        self.z: C = None
        self.t: B = None
        self.q: D = None
        self.r: D = None
        self.v: C = None
        self.w: D = None
        self.txt = txt

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

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

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