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

class B:
    def __init__(self, txt: str):
        self.u: G = None
        self.t: H = None
        self.r: G = None
        self.txt = txt

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

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

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

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

class G:
    def __init__(self, txt: str):
        self.z: E = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.w: G = None
        self.o: D = None
        self.t: C = None
        self.q: F = None
        self.x: D = None
        self.s: F = None
        self.v: F = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.u: G = None
        self.t: H = None
        self.r: G = None
        self.txt = txt

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

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

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

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

class G:
    def __init__(self, txt: str):
        self.z: E = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.w: G = None
        self.o: D = None
        self.t: C = None
        self.q: F = None
        self.x: D = None
        self.s: F = None
        self.v: F = None
        self.txt = txt

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

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