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

class B:
    def __init__(self, txt: str):
        self.w: G = None
        self.u: F = None
        self.z: F = None
        self.txt = txt

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

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

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

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

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

class H:
    def __init__(self, txt: str):
        self.u: D = None
        self.t: B = None
        self.r: E = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.w: G = None
        self.u: F = None
        self.z: F = None
        self.txt = txt

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

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

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

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

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

class H:
    def __init__(self, txt: str):
        self.u: D = None
        self.t: B = None
        self.r: E = None
        self.txt = txt

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

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