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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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