class A:
    def __init__(self, txt: str):
        self.x: C = None
        self.q: D = None
        self.w: G = None
        self.o: F = None
        self.z: E = None
        self.t: D = None
        self.p: C = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.q: G = None
        self.o: G = None
        self.s: A = None
        self.r: H = None
        self.v: A = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.v: A = None
        self.x: H = None
        self.u: F = None
        self.q: C = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.r: C = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.t: D = None
        self.u: A = None
        self.r: A = None
        self.y: B = None
        self.x: F = None
        self.txt = txt

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

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

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

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

class C:
    def __init__(self, txt: str):
        self.q: G = None
        self.o: G = None
        self.s: A = None
        self.r: H = None
        self.v: A = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.v: A = None
        self.x: H = None
        self.u: F = None
        self.q: C = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.r: C = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.t: D = None
        self.u: A = None
        self.r: A = None
        self.y: B = None
        self.x: F = None
        self.txt = txt

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

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

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