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

class B:
    def __init__(self, txt: str):
        self.s: H = None
        self.t: D = None
        self.y: D = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.w: C = None
        self.q: C = None
        self.z: C = None
        self.o: A = None
        self.t: C = None
        self.y: A = None
        self.r: G = None
        self.txt = txt

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

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

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

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

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

class B:
    def __init__(self, txt: str):
        self.s: H = None
        self.t: D = None
        self.y: D = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.w: C = None
        self.q: C = None
        self.z: C = None
        self.o: A = None
        self.t: C = None
        self.y: A = None
        self.r: G = None
        self.txt = txt

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

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

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

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

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