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

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

class C:
    def __init__(self, txt: str):
        self.w: F = None
        self.v: B = None
        self.x: D = None
        self.z: H = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.r: H = None
        self.z: B = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.y: D = None
        self.r: A = None
        self.u: H = None
        self.p: A = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.p: B = None
        self.txt = txt

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

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

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

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

class C:
    def __init__(self, txt: str):
        self.w: F = None
        self.v: B = None
        self.x: D = None
        self.z: H = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.r: H = None
        self.z: B = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.y: D = None
        self.r: A = None
        self.u: H = None
        self.p: A = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.p: B = None
        self.txt = txt

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

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

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