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

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

class C:
    def __init__(self, txt: str):
        self.p: A = None
        self.z: D = None
        self.u: G = None
        self.s: A = None
        self.o: H = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.u: G = None
        self.o: B = None
        self.t: A = None
        self.p: F = None
        self.r: C = None
        self.txt = txt

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

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

class H:
    def __init__(self, txt: str):
        self.s: A = None
        self.t: C = None
        self.v: F = None
        self.u: F = None
        self.txt = txt

d = A("d")
l = B("l")
h = C("h")
i = D("i")
e = E("e")
c = F("c")
b = G("b")
a = H("a")

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

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

class C:
    def __init__(self, txt: str):
        self.p: A = None
        self.z: D = None
        self.u: G = None
        self.s: A = None
        self.o: H = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.u: G = None
        self.o: B = None
        self.t: A = None
        self.p: F = None
        self.r: C = None
        self.txt = txt

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

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

class H:
    def __init__(self, txt: str):
        self.s: A = None
        self.t: C = None
        self.v: F = None
        self.u: F = None
        self.txt = txt

d = A("d")
l = B("l")
h = C("h")
i = D("i")
e = E("e")
c = F("c")
b = G("b")
a = H("a")

d.t = c
l.x = i
l.t = i
h.p = d
h.s = d
h.z = i
h.u = b
h.o = a
i.w = b
i.o = b
i.t = l
i.p = h
i.z = c
i.q = e
i.y = e
e.u = b
e.o = l
e.t = d
e.p = c
e.r = h
c.s = l
b.v = i
b.q = c
b.y = l
b.u = l
b.r = e
a.s = d
a.t = h
a.v = c
a.u = c
assert i.w.v.p.s.t.s.txt == "l"