class A:
    def __init__(self, txt: str):
        self.p: G = None
        self.txt = txt

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

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

class D:
    def __init__(self, txt: str):
        self.w: A = None
        self.p: D = None
        self.s: C = None
        self.u: C = None
        self.t: D = None
        self.v: C = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.o: F = None
        self.r: D = None
        self.p: G = None
        self.x: F = None
        self.z: F = None
        self.v: B = None
        self.s: B = None
        self.w: D = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.w: C = None
        self.y: H = None
        self.v: F = None
        self.u: D = None
        self.txt = txt

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

b = A("b")
n = B("n")
j = C("j")
i = D("i")
d = E("d")
g = F("g")
h = G("h")
f = H("f")
c = D("c")

b.p = h
n.u = j
n.p = g
n.v = c
n.w = d
n.o = f
j.r = d
j.t = d
j.z = n
j.p = g
i.w = b
i.p = c
i.t = c
i.s = j
i.u = j
i.v = j
d.o = g
d.x = g
d.z = g
d.r = c
d.w = c
d.p = h
d.v = n
d.s = n
g.o = j
g.x = i
h.w = j
h.y = f
h.v = g
h.u = i
f.y = j
f.x = n
c.w = b
c.p = i
c.t = i
c.s = j
c.u = j
c.v = j
assert f.y.z.u.z.v.s.t.v.txt == "
class A:
    def __init__(self, txt: str):
        self.p: G = None
        self.txt = txt

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

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

class D:
    def __init__(self, txt: str):
        self.w: A = None
        self.p: D = None
        self.s: C = None
        self.u: C = None
        self.t: D = None
        self.v: C = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.o: F = None
        self.r: D = None
        self.p: G = None
        self.x: F = None
        self.z: F = None
        self.v: B = None
        self.s: B = None
        self.w: D = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.w: C = None
        self.y: H = None
        self.v: F = None
        self.u: D = None
        self.txt = txt

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

b = A("b")
n = B("n")
j = C("j")
i = D("i")
d = E("d")
g = F("g")
h = G("h")
f = H("f")
c = D("c")

b.p = h
n.u = j
n.p = g
n.v = c
n.w = d
n.o = f
j.r = d
j.t = d
j.z = n
j.p = g
i.w = b
i.p = c
i.t = c
i.s = j
i.u = j
i.v = j
d.o = g
d.x = g
d.z = g
d.r = c
d.w = c
d.p = h
d.v = n
d.s = n
g.o = j
g.x = i
h.w = j
h.y = f
h.v = g
h.u = i
f.y = j
f.x = n
c.w = b
c.p = i
c.t = i
c.s = j
c.u = j
c.v = j
assert f.y.z.u.z.v.s.t.v.txt == "n"