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

class B:
    def __init__(self, txt: str):
        self.x: H = None
        self.o: H = None
        self.u: E = None
        self.v: G = None
        self.q: G = None
        self.s: D = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.x: H = None
        self.u: E = None
        self.p: C = None
        self.txt = txt

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

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

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

class H:
    def __init__(self, txt: str):
        self.o: F = None
        self.q: E = None
        self.r: B = None
        self.y: B = None
        self.t: A = None
        self.z: G = None
        self.x: B = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.x: H = None
        self.o: H = None
        self.u: E = None
        self.v: G = None
        self.q: G = None
        self.s: D = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.x: H = None
        self.u: E = None
        self.p: C = None
        self.txt = txt

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

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

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

class H:
    def __init__(self, txt: str):
        self.o: F = None
        self.q: E = None
        self.r: B = None
        self.y: B = None
        self.t: A = None
        self.z: G = None
        self.x: B = None
        self.txt = txt

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

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