class A:
    def __init__(self, txt: str):
        self.x: B = None
        self.o: H = None
        self.p: G = None
        self.t: D = None
        self.txt = txt

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

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

class D:
    def __init__(self, txt: str):
        self.y: A = None
        self.q: C = None
        self.x: G = None
        self.u: G = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.s: D = None
        self.o: G = None
        self.r: G = None
        self.u: D = None
        self.txt = txt

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

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

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.y: A = None
        self.q: C = None
        self.x: G = None
        self.u: G = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.s: D = None
        self.o: G = None
        self.r: G = None
        self.u: D = None
        self.txt = txt

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

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

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

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