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

class B:
    def __init__(self, txt: str):
        self.w: E = None
        self.x: E = None
        self.v: A = None
        self.q: D = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.q: G = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.u: C = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.x: F = None
        self.r: B = None
        self.z: C = None
        self.q: B = None
        self.p: A = None
        self.w: C = None
        self.txt = txt

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

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

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

class B:
    def __init__(self, txt: str):
        self.w: E = None
        self.x: E = None
        self.v: A = None
        self.q: D = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.q: G = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.u: C = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.x: F = None
        self.r: B = None
        self.z: C = None
        self.q: B = None
        self.p: A = None
        self.w: C = None
        self.txt = txt

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

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

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