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

class B:
    def __init__(self, txt: str):
        self.z: G = None
        self.w: C = None
        self.v: A = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.y: E = None
        self.p: B = None
        self.s: B = None
        self.r: H = None
        self.t: D = None
        self.v: D = None
        self.z: E = None
        self.w: D = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.v: D = None
        self.z: H = None
        self.r: E = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.y: A = None
        self.t: F = None
        self.s: F = None
        self.z: B = None
        self.q: G = None
        self.w: C = None
        self.o: A = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.z: G = None
        self.w: C = None
        self.v: A = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.y: E = None
        self.p: B = None
        self.s: B = None
        self.r: H = None
        self.t: D = None
        self.v: D = None
        self.z: E = None
        self.w: D = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.v: D = None
        self.z: H = None
        self.r: E = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.y: A = None
        self.t: F = None
        self.s: F = None
        self.z: B = None
        self.q: G = None
        self.w: C = None
        self.o: A = None
        self.txt = txt

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

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