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

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

class C:
    def __init__(self, txt: str):
        self.v: A = None
        self.q: B = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.y: A = None
        self.s: H = None
        self.v: E = None
        self.txt = txt

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

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

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

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

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

class C:
    def __init__(self, txt: str):
        self.v: A = None
        self.q: B = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.y: A = None
        self.s: H = None
        self.v: E = None
        self.txt = txt

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

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

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

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