class A:
    def __init__(self, txt: str):
        self.y: A = None
        self.p: G = None
        self.q: C = None
        self.s: F = None
        self.x: C = None
        self.z: F = None
        self.txt = txt

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

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

class D:
    def __init__(self, txt: str):
        self.q: A = None
        self.x: G = None
        self.t: D = None
        self.w: A = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.s: A = None
        self.t: A = None
        self.r: A = None
        self.w: G = None
        self.z: D = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.o: A = None
        self.t: D = None
        self.p: F = None
        self.z: H = None
        self.s: B = None
        self.u: D = None
        self.v: A = None
        self.r: B = None
        self.txt = txt

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

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.q: A = None
        self.x: G = None
        self.t: D = None
        self.w: A = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.s: A = None
        self.t: A = None
        self.r: A = None
        self.w: G = None
        self.z: D = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.o: A = None
        self.t: D = None
        self.p: F = None
        self.z: H = None
        self.s: B = None
        self.u: D = None
        self.v: A = None
        self.r: B = None
        self.txt = txt

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

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

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