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

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

class C:
    def __init__(self, txt: str):
        self.v: B = None
        self.t: B = None
        self.r: A = None
        self.y: A = None
        self.s: A = None
        self.q: D = None
        self.z: F = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.y: F = None
        self.r: D = None
        self.t: A = None
        self.o: D = None
        self.z: A = None
        self.x: C = None
        self.u: C = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.x: A = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.v: C = None
        self.r: A = None
        self.w: E = None
        self.o: A = None
        self.txt = txt

e = A("e")
d = B("d")
k = C("k")
b = D("b")
j = E("j")
m = F("m")
f = G("f")

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

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

class C:
    def __init__(self, txt: str):
        self.v: B = None
        self.t: B = None
        self.r: A = None
        self.y: A = None
        self.s: A = None
        self.q: D = None
        self.z: F = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.y: F = None
        self.r: D = None
        self.t: A = None
        self.o: D = None
        self.z: A = None
        self.x: C = None
        self.u: C = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.x: A = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.v: C = None
        self.r: A = None
        self.w: E = None
        self.o: A = None
        self.txt = txt

e = A("e")
d = B("d")
k = C("k")
b = D("b")
j = E("j")
m = F("m")
f = G("f")

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