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

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

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

class D:
    def __init__(self, txt: str):
        self.x: B = None
        self.p: G = None
        self.r: C = None
        self.s: G = None
        self.y: C = None
        self.o: G = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.p: E = None
        self.z: A = None
        self.s: E = None
        self.w: E = None
        self.txt = txt

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

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.x: B = None
        self.p: G = None
        self.r: C = None
        self.s: G = None
        self.y: C = None
        self.o: G = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.p: E = None
        self.z: A = None
        self.s: E = None
        self.w: E = None
        self.txt = txt

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

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

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