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

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

class C:
    def __init__(self, txt: str):
        self.t: E = None
        self.z: C = None
        self.u: C = None
        self.p: E = None
        self.w: G = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.u: B = None
        self.v: F = None
        self.s: F = None
        self.o: C = None
        self.y: H = None
        self.txt = txt

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

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

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

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

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

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

class C:
    def __init__(self, txt: str):
        self.t: E = None
        self.z: C = None
        self.u: C = None
        self.p: E = None
        self.w: G = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.u: B = None
        self.v: F = None
        self.s: F = None
        self.o: C = None
        self.y: H = None
        self.txt = txt

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

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

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

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

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