class A:
    def __init__(self, txt: str):
        self.r: H = None
        self.z: C = None
        self.txt = txt

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

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

class D:
    def __init__(self, txt: str):
        self.p: C = None
        self.x: H = None
        self.txt = txt

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

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

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

class H:
    def __init__(self, txt: str):
        self.o: B = None
        self.x: B = None
        self.t: F = None
        self.p: G = None
        self.q: F = None
        self.y: C = None
        self.r: F = None
        self.w: C = None
        self.txt = txt

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.p: C = None
        self.x: H = None
        self.txt = txt

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

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

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

class H:
    def __init__(self, txt: str):
        self.o: B = None
        self.x: B = None
        self.t: F = None
        self.p: G = None
        self.q: F = None
        self.y: C = None
        self.r: F = None
        self.w: C = None
        self.txt = txt

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

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