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

class B:
    def __init__(self, txt: str):
        self.p: F = None
        self.v: D = None
        self.u: H = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.r: D = None
        self.s: G = None
        self.t: H = None
        self.txt = txt

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

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

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

class G:
    def __init__(self, txt: str):
        self.x: A = None
        self.p: D = None
        self.r: E = None
        self.w: E = None
        self.t: B = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.v: A = None
        self.x: H = None
        self.w: A = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.p: F = None
        self.v: D = None
        self.u: H = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.r: D = None
        self.s: G = None
        self.t: H = None
        self.txt = txt

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

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

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

class G:
    def __init__(self, txt: str):
        self.x: A = None
        self.p: D = None
        self.r: E = None
        self.w: E = None
        self.t: B = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.v: A = None
        self.x: H = None
        self.w: A = None
        self.txt = txt

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

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