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

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

class C:
    def __init__(self, txt: str):
        self.x: A = None
        self.s: C = None
        self.q: B = None
        self.o: E = None
        self.txt = txt

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

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

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

class G:
    def __init__(self, txt: str):
        self.p: D = None
        self.q: A = None
        self.y: B = None
        self.u: D = None
        self.v: D = None
        self.txt = txt

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

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

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

class C:
    def __init__(self, txt: str):
        self.x: A = None
        self.s: C = None
        self.q: B = None
        self.o: E = None
        self.txt = txt

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

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

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

class G:
    def __init__(self, txt: str):
        self.p: D = None
        self.q: A = None
        self.y: B = None
        self.u: D = None
        self.v: D = None
        self.txt = txt

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

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