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

class B:
    def __init__(self, txt: str):
        self.o: G = None
        self.v: D = None
        self.y: G = None
        self.z: H = None
        self.x: H = None
        self.q: F = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.r: F = None
        self.o: A = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.r: B = None
        self.p: G = None
        self.txt = txt

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

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

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

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

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

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

class B:
    def __init__(self, txt: str):
        self.o: G = None
        self.v: D = None
        self.y: G = None
        self.z: H = None
        self.x: H = None
        self.q: F = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.r: F = None
        self.o: A = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.r: B = None
        self.p: G = None
        self.txt = txt

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

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

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

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

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

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